oslo.config deprecated_name issue

asked 2016-04-25 12:51:50 -0600

stewie925 gravatar image

Hi all,

Recently I have made a change in vertica config under /trove/trove/common/cfg.py where I rename an existing config parameter 'cluster_member_group' to 'min_cluster_member_group' , and at the same time I also set the original parameter name to deprecated so it can be backwards-compatible. So i also added a deprecated_group='vertical' for added measure.

    cfg.IntOpt('min_cluster_member_count', default=3,
           help='Minimum number of members in Vertica cluster.',

However when I ran tox -e py27 test, the results show

    oslo.config.cfg.NoSuchOptError: no such option in group vertica: cluster_member_count

Going thru the error log I found that the original parameter name is being referenced in another code inside trove called /trove/trove/common/strategies/vertica/api.py. My first instinct was to just rename those references to the new one, but then the bug report indicated that I need to use the deprecated_name. I've googled and found that I probably need to use DeprecatedOpts as well - but there are no code samples on how to use this along with deprecated_name. Would appreciate the community's input.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-05-11 19:44:41 -0600

stewie925 gravatar image

updated 2016-05-11 19:46:20 -0600

Turns out I had to do a 'grep' on all files related to Vertica, and rename anything with 'cluster_member_count' to 'min_cluster_member_count' . Once I made that change, the "tox -e py27 test" was successful.

Hope this helps those with the same problem.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-04-25 12:50:59 -0600

Seen: 153 times

Last updated: May 11 '16