Reviewed: https://review.openstack.org/323428 Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a8da782051fc085fcb417c6d277a5e27586e2380 Submitter: Jenkins Branch: master
commit a8da782051fc085fcb417c6d277a5e27586e2380 Author: Ihar Hrachyshka <[email protected]> Date: Tue May 31 16:51:30 2016 +0200 Guard against config_dirs not defined on ConfigOpts Turned out that if the code extracts config_dirs value from ConfigOpts objects before config files are parsed, then oslo.config will raise NoSuchOptError exception. This is not a usual mode of operation for the code, since main() function of the process using it is expected to parse CLI and config files before using it, it may nevertheless happen in some test code. This patch guards against those exceptions, falling back to /etc/neutron, as we already do when --config-dir is not specified. Change-Id: I00cf824baa8580b7aa7ec4518a4741e49c998364 Closes-Bug: #1587359 ** Changed in: neutron Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to neutron. https://bugs.launchpad.net/bugs/1587359 Title: oslo_config.cfg.NoSuchOptError: no such option in group DEFAULT: config_dirs Status in bgpvpn: Confirmed Status in neutron: Fix Released Bug description: We have the following traceback in a networking-bgpvpn test [1]. 2016-05-31 09:04:33.341 | FAIL: networking_bgpvpn.tests.unit.db.test_db.BgpvpnDBTestCase.test_db_associate_twice 2016-05-31 09:04:33.341 | tags: worker-0 2016-05-31 09:04:33.342 | ---------------------------------------------------------------------- 2016-05-31 09:04:33.342 | Traceback (most recent call last): 2016-05-31 09:04:33.342 | File "networking_bgpvpn/tests/unit/db/test_db.py", line 29, in setUp 2016-05-31 09:04:33.342 | super(BgpvpnDBTestCase, self).setUp() 2016-05-31 09:04:33.342 | File "networking_bgpvpn/tests/unit/services/test_plugin.py", line 81, in setUp 2016-05-31 09:04:33.342 | {constants.BGPVPN: plugin.BGPVPNPlugin(), 2016-05-31 09:04:33.343 | File "networking_bgpvpn/neutron/services/plugin.py", line 44, in __init__ 2016-05-31 09:04:33.343 | pconf.ProviderConfiguration('networking_bgpvpn')) 2016-05-31 09:04:33.343 | File "/tmp/openstack/neutron/neutron/services/provider_configuration.py", line 209, in __init__ 2016-05-31 09:04:33.343 | for prov in parse_service_provider_opt(svc_module): 2016-05-31 09:04:33.343 | File "/tmp/openstack/neutron/neutron/services/provider_configuration.py", line 158, in parse_service_provider_opt 2016-05-31 09:04:33.343 | svc_providers_opt = neutron_mod.service_providers() 2016-05-31 09:04:33.343 | File "/tmp/openstack/neutron/neutron/services/provider_configuration.py", line 114, in service_providers 2016-05-31 09:04:33.344 | providers = self.ini().service_providers.service_provider 2016-05-31 09:04:33.344 | File "/tmp/openstack/neutron/neutron/services/provider_configuration.py", line 74, in ini 2016-05-31 09:04:33.344 | neutron_dirs = cfg.CONF.config_dirs or ['/etc/neutron'] 2016-05-31 09:04:33.344 | File "/home/jenkins/workspace/gate-networking-bgpvpn-python27/.tox/py27/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2185, in __getattr__ 2016-05-31 09:04:33.344 | raise NoSuchOptError(name) 2016-05-31 09:04:33.344 | oslo_config.cfg.NoSuchOptError: no such option in group DEFAULT: config_dirs This is related to neutron commit 7f31ccb7bbe0f78a34d704c59d0562ea10029893 [2]. [1] http://logs.openstack.org/51/232451/18/check/gate-networking-bgpvpn-python27/489d2a5/console.html#_2016-05-31_09_04_33_342 [2] https://github.com/openstack/neutron/commit/7f31ccb7bbe0f78a34d704c59d0562ea10029893 To manage notifications about this bug go to: https://bugs.launchpad.net/bgpvpn/+bug/1587359/+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

