[openstack-dev] [openstack][nova] Streamlining of config options in nova

mhorban mhorban at mirantis.com
Thu Jul 23 14:55:36 UTC 2015


Hi all,

During development process in nova I faced with an issue related with config
options. Now we have lists of config options and registering options mixed
with source code in regular files.
 From one side it can be convenient: to have module-encapsulated config
options. But problems appear when we need to use some config option in
different modules/packages.

If some option is registered in module X and module X imports module Y for
some reasons...
and in one day we need to import this option in module Y we will get 
exception
NoSuchOptError on import_opt in module Y.
Because of circular dependency.
To resolve it we can move registering of this option in Y module(in the
inappropriate place) or use other tricks.

I offer to create file options.py in each package and move all package's
config options and registration code there.
Such approach allows us to import any option in any place of nova without
problems.

Implementations of this refactoring can be done piece by piece where 
piece is
one package.

What is your opinion about this idea?

Marian



More information about the OpenStack-dev mailing list