Default value of config options are incorrect in sample config file

Bug #1904250 reported by Ghanshyam Mann on 2020-11-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Undecided
Ghanshyam Mann

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.

Changed in nova:
assignee: nobody → Ghanshyam Mann (ghanshyammann)
status: New → In Progress

This issue was fixed in the openstack/nova 23.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers