ofagent UT failure

Bug #1392569 reported by YAMAMOTO Takashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
YAMAMOTO Takashi

Bug Description

recent changes (the one in policy module) made ofagent UT fail.

note: the failure depends on execution order of tests.

eg. "tox -e py27 neutron.tests.unit.ofagent.test_ofa_neutron_agent"

Traceback (most recent call last):
  File "neutron/tests/unit/ofagent/test_ofa_neutron_agent.py", line 217, in setUp
    self.agent = self.mod_agent.OFANeutronAgent(self.ryuapp, **kwargs) File "neutron/plugins/ofagent/agent/ofa_neutron_agent.py", line 249, in __init__
    self.setup_rpc()
  File "neutron/plugins/ofagent/agent/ofa_neutron_agent.py", line 301, in setup_
rpc
    self.context = context.get_admin_context_without_session()
  File "neutron/context.py", line 177, in get_admin_context_without_session
    read_deleted=read_deleted)
  File "neutron/context.py", line 68, in __init__
    self.is_advsvc = policy.check_is_advsvc(self)
  File "neutron/policy.py", line 434, in check_is_advsvc
    init()
  File "neutron/policy.py", line 79, in init
    _ENFORCER.load_rules(True)
  File "neutron/openstack/common/policy.py", line 246, in load_rules
    path = self._get_policy_path(path)
  File "neutron/openstack/common/policy.py", line 282, in _get_policy_path
    policy_path = CONF.find_file(path)
  File "/disks/774373a2-e180-11e3-9fa1-08606e7f74e7/git/neutron/.tox/py27/lib/python2.7/site-packages/oslo/config/cfg.py", line 1958, in find_file
    if self.config_dir:
  File "/disks/774373a2-e180-11e3-9fa1-08606e7f74e7/git/neutron/.tox/py27/lib/python2.7/site-packages/oslo/config/cfg.py", line 1697, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option: config_dir

description: updated
tags: added: openflowagent
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/134435

Changed in neutron:
assignee: nobody → YAMAMOTO Takashi (yamamoto)
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/134435
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5da567f6035a97cd989f1da9f6bafc4c4396bfa2
Submitter: Jenkins
Branch: master

commit 5da567f6035a97cd989f1da9f6bafc4c4396bfa2
Author: YAMAMOTO Takashi <email address hidden>
Date: Fri Nov 14 12:39:37 2014 +0900

    ofa_test_base: Fix NoSuchOptError in UT

    Ensure setting up cfg.CONF.
    Otherwise, depending on the execution order of tests,
    some tests in test_ofa_neutron_agent can fail with
    the following exception:

        NoSuchOptError: no such option: config_dir

    The problem has been exposed by the recently merged change
    for policy module, commit d83731a96d3b47fab1295de1fb53cfe30576619c .

    Closes-Bug: #1392569
    Change-Id: I0d38df0510b95160c67ea7b76ed413138fa3d770

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-1 → 2015.1.0
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.