[openstack-dev] [neutron] Configuration file generator
zhongyue.nah at intel.com
Tue Jul 23 03:20:58 UTC 2013
On Tue, Jul 23, 2013 at 6:55 AM, Emilien Macchi <emilien.macchi at enovance.com
> Also for your information,
> I created a bug : https://bugs.launchpad.net/neutron/+bug/1199963
> and a first patchset for generating the new configuration file with Oslo
> config scripts :
> Emilien Macchi
> # OpenStack Engineer
> // eNovance Inc. http://enovance.com
> // ✉ emilien at enovance.com ☎ +33 (0)1 49 70 99 80
> // 10 rue de la Victoire 75009 Paris
> On 07/22/2013 06:34 PM, Julien Danjou wrote:
> Hi there,
> I've been working on the changes that would need to be done to make the
> default config generator work for Neutron.
> However, the current default config generator doesn't support the
> possibility to generate different configuration files (e.g. one per
> service/plugin). I can imagine two options:
> a. move every options in oslo.config.cfg.CONF, moving the plugins into
> their own section rather than in their own file, register all options
> at module-level, avoiding duplicate options.
> b. enhance config.generator to generate a config file from a particular
> object (not always olso.config.cfg.CONF like it's done currently).
> That means Neutron should evolve to provide a global CONF object per
> plugin at least.
Actually the current generator script looks for an instance or a list of
instances of classes which are inherited from cfg.Opt. For example, if
module a.py has
_opt = cfg.StrOpt(a)
_opts = [
Then the generator.py catches _opt and _opts and prints the config info
onto the config file.
The group info of a particular option is searched in oslo.config.cfg.CONF.
> Option a. is how all other OpenStack projects¹ are working so far.
> Option b. requires a bit more work on both side.
> Is there any particular way you guys see things?
> IMO, we shouldn't change how Neutron uses its config files due to
backwards compatibility issues. I was thinking of each project having a
openstack-config.conf file (like openstack-common.conf) which contains the
mapping of options to config file names.
Then the generator.py will load the openstack-config.conf file and generate
config files accordingly. An exception will be raised If an option is
neglected in openstack-config.conf
But whatever path we take, it would be hard to land a perfect solution
within Havana. So I suggest we first stick with neutron.conf.sample for now.
> ¹ nova, ceilometer and heat at least for now
> OpenStack-dev mailing listOpenStack-dev at lists.openstack.orghttp://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
880 Zixing Road, Zizhu Science Park, Minhang District, 200241, Shanghai,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev