← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1904250] [NEW] Default value of config options are incorrect in sample config file

 

Public bug reported:

There are multiple places where nova set the new default value for other
(than nova) namespace config option for example oslo lib config options.

That is done via oslo APO set_defaults, like
- https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/nova/config.py#L62
- https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/nova/policy.py#L48

and these defaults are reflected in code also which is all good and
working as expected. But when config sample file is generated via oslo-
config-generator tool (tox -egenconfig) then these defaults which are
set by Nova are not reflected and this tool take the raw defaults. You
can see this issue by generating the new config sample and check what
are the defaults for [control_exchange] or [oslo_policy].policy_file

To solve this issue oslo config provide a option to add hook to reflect
the new default in onfig generator -
https://docs.openstack.org/oslo.config/latest/cli/generator.html
#modifying-defaults-from-other-namespaces

We already doing it for middleware cors option -
https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/setup.cfg#L41

Whenever we set default value for non-nova namespace config we need to
add those in this hook too so that config sample file are generated with
correct defaults.

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1904250

Title:
  Default value of config options are incorrect in sample config file

Status in OpenStack Compute (nova):
  New

Bug description:
  There are multiple places where nova set the new default value for
  other (than nova) namespace config option for example oslo lib config
  options.

  That is done via oslo APO set_defaults, like
  - https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/nova/config.py#L62
  - https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/nova/policy.py#L48

  and these defaults are reflected in code also which is all good and
  working as expected. But when config sample file is generated via
  oslo-config-generator tool (tox -egenconfig) then these defaults which
  are set by Nova are not reflected and this tool take the raw defaults.
  You can see this issue by generating the new config sample and check
  what are the defaults for [control_exchange] or
  [oslo_policy].policy_file

  To solve this issue oslo config provide a option to add hook to
  reflect the new default in onfig generator -
  https://docs.openstack.org/oslo.config/latest/cli/generator.html
  #modifying-defaults-from-other-namespaces

  We already doing it for middleware cors option -
  https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/setup.cfg#L41

  Whenever we set default value for non-nova namespace config we need to
  add those in this hook too so that config sample file are generated
  with correct defaults.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1904250/+subscriptions