oslo_config.cfg.NoSuchOptError: no such option in group DEFAULT: config_dirs

Bug #1587359 reported by Thomas Morin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-bgpvpn
Fix Released
Critical
Unassigned
neutron
Fix Released
High
Ihar Hrachyshka

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

Changed in bgpvpn:
status: New → Confirmed
importance: Undecided → Critical
description: updated
Changed in bgpvpn:
milestone: none → 5.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/323428

Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → In Progress
Changed in neutron:
importance: Undecided → High
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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 address hidden>
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
Changed in bgpvpn:
status: Confirmed → Fix Released
tags: added: neutron-proactive-backport-potential
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 9.0.0.0b2

This issue was fixed in the openstack/neutron 9.0.0.0b2 development milestone.

tags: removed: neutron-proactive-backport-potential
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.