Incorrect group name in conf when deprecated_group is not specified

Bug #1554657 reported by Sabari Murugesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
Undecided
Tan Lin

Bug Description

When an opt is defined with a deprecated_name alias but not with
deprecated_group, the generated conf file assumes 'DEFAULT' section.

i.e say we do :-
opt = cfg.StrOpt('cinder_os_region_name', deprecated_name='os_region_name',
                  help=_('..'))
conf.register_opt([opt], group='glance_store')

we get the following in the generated conf file :-
 Deprecated group/name - [DEFAULT]/os_region_name
 cinder_os_region_name = <None>

Instead of,
 Deprecated group/name - [glance_store]/os_region_name
 cinder_os_region_name = <None>

On contrary, when you register such an opt, the deprecated_name is
associated against the registered group. Thus, the generated conf
is not in sync.

We found this issue when generating glance-api conf's but this
could be affecting other projects as well.

Changed in oslo.config:
assignee: nobody → Sabari Murugesan (smurugesan)
Changed in oslo.config:
status: New → In Progress
Changed in oslo.config:
assignee: Sabari Murugesan (smurugesan) → Tan Lin (tan-lin-good)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.config (master)

Reviewed: https://review.openstack.org/288804
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=77505c7a5a34efddc7bdd8b6ccd371963b5f360d
Submitter: Jenkins
Branch: master

commit 77505c7a5a34efddc7bdd8b6ccd371963b5f360d
Author: Sabari Kumar Murugesan <email address hidden>
Date: Fri Mar 4 15:33:21 2016 -0800

    Incorrect group name when deprecated_group is not specified

    When an opt is defined with a deprecated_name alias but not with
    deprecated_group, the generated conf file assumes 'DEFAULT' section.

    i.e say we do :-
    opt = cfg.StrOpt('cinder_os_region_name', deprecated_name='os_region_name',
                      help=_('..'))
    conf.register_opt([opt], group='glance_store')

    we get the following in the generated conf file :-
     Deprecated group/name - [DEFAULT]/os_region_name
     cinder_os_region_name = <None>

    Instead of,
     Deprecated group/name - [glance_store]/os_region_name
     cinder_os_region_name = <None>

    On contrary, when you register such an opt, the deprecated_name is
    associated against the registered group. Thus, the generated conf
    is not in sync.

    We found this issue when generating glance-api conf's but this
    could be affecting other projects as well.

    Closes-Bug: #1554657
    Co-Authored-By: Tan Lin<email address hidden>
    Change-Id: I9577abec87b20fc3d74fb71e327e32d7def8ac5d

Changed in oslo.config:
status: In Progress → Fix Released
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/oslo.config 3.11.0

This issue was fixed in the openstack/oslo.config 3.11.0 release.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.