[openstack-dev] [Nova][Oslo.cfg] Configuration string substitution

Doug Hellmann doug.hellmann at dreamhost.com
Wed Jun 18 13:19:49 UTC 2014


On Wed, Jun 18, 2014 at 4:47 AM, Gary Kotton <gkotton at vmware.com> wrote:
> Hi,
> I have encountered a problem with string substitution with the nova
> configuration file. The motivation was to move all of the glance settings to
> their own section (https://review.openstack.org/#/c/100567/). The
> glance_api_servers had default setting that uses the current glance_host and
> the glance port. This is a problem when we move to the ‘glance’ section.
> First and foremost I think that we need to decide on how we should denote
> the string substitutions for group variables and then we can dive into
> implementation details. Does anyone have any thoughts on this?
>
> My thinking is that when we use we should use a format of $<group>.<key>. An
> example is below.
>
> Original code:
>
>     cfg.ListOpt('glance_api_servers',
>                 default=['$glance_host:$glance_port'],
>                 help='A list of the glance api servers available to nova. '
>                      'Prefix with https:// for ssl-based glance api servers.
> '
>                      '([hostname|ip]:port)'),
>
> Proposed change (in the glance section):
>     cfg.ListOpt('api_servers',
>                 default=[‘$glance.host:$glance.port'],
>                 help='A list of the glance api servers available to nova. '
>                      'Prefix with https:// for ssl-based glance api servers.
> '
>                      '([hostname|ip]:port)’,
>                 deprecated_group='DEFAULT’,
>
> deprecated_name='glance_api_servers'),
>
> This would require some preprocessing on the oslo.cfg side to be able to
> understand the $glance is the specific group and then host is the requested
> value int he group.
>
> Thanks
> Gary

Do we need to set the variable off somehow to allow substitutions that
need the literal '.' after a variable? How often is that likely to
come up?

Doug

>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



More information about the OpenStack-dev mailing list