Reviewed: https://review.openstack.org/355597 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8ddf174a3081b0a60964fa196c46c97e8a475fff Submitter: Jenkins Branch: master
commit 8ddf174a3081b0a60964fa196c46c97e8a475fff Author: Maciej Szankin <[email protected]> Date: Mon Aug 15 13:50:19 2016 -0500 Fix check_config_option_in_central_place Updated check_config_option_in_central_place. All options with one exception were moved to central location. Added list that tracks these exceptions. Also nova/tests should be treated as an exception - there is another check that validates if config options are not registered in tests. Closes-Bug: #1613411 Blueprint centralize-config-options-ocata Change-Id: I802aaf61e711eb4cfa206e4a52e969128dee2189 ** Changed in: nova Status: In Progress => Fix Released -- 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/1613411 Title: check_config_option_in_central_place does not check anything Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== Hacking check check_config_option_in_central_place does not check anything. It is because of `not` keyword in https://github.com/openstack/nova/blob/master/nova/hacking/checks.py#L660 , which causes every file that is checked and is not in nova/conf directory to be omitted. Steps to reproduce ================== 1. Add dummy config opt to random file, for example: diff --git a/nova/cmd/api.py b/nova/cmd/api.py index d8c76ca..d5fe906 100644 --- a/nova/cmd/api.py +++ b/nova/cmd/api.py @@ -22,6 +22,7 @@ Starts both the EC2 and OpenStack APIs in separate greenthreads. import sys +from oslo_config import cfg from oslo_log import log as logging from oslo_reports import guru_meditation_report as gmr import six @@ -39,6 +40,8 @@ CONF = nova.conf.CONF def main(): + new_opt = cfg.StrOpt('test_opt', default='test', + help='test_opt description') config.parse_args(sys.argv) logging.setup(CONF, "nova") utils.monkey_patch() 2. Run tox with command: $ tox -epep8 3. Observe as no N342 checking error is reported. Expected result =============== N342 checking error is reported Actual result ============= No N342 checking error is reported. Environment =========== Nova master branch, commit 15e536518ae1a366c8a8b15d9183072050e4b6f2 (newest when reporting this bug). Logs & Configs ============== No need for logs. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1613411/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

