Unit test failure: delete_port() got an unexpected keyword argument 'l3_port_check'

Bug #1273259 reported by Anita Kuno
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Isaku Yamahata
Havana
Fix Released
Undecided
Unassigned

Bug Description

FAIL: neutron.tests.unit.test_extension_ext_gw_mode.TestL3GwModeMixin.test_update_router_gw_with_gw_info_none
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
pythonlogging:''
stderr
stdout

Traceback (most recent call last):
File "/home/jenkins/workspace/gate-neutron-python27/neutron/tests/unit/test_extension_ext_gw_mode.py", line 251, in test_update_router_gw_with_gw_info_none
self._test_update_router_gw(None, True)
File "/home/jenkins/workspace/gate-neutron-python27/neutron/tests/unit/test_extension_ext_gw_mode.py", line 238, in _test_update_router_gw
self.context, self.router.id, gw_info)
File "/home/jenkins/workspace/gate-neutron-python27/neutron/db/l3_gwmode_db.py", line 62, in _update_router_gw_info
context, router_id, info, router=router)
File "/home/jenkins/workspace/gate-neutron-python27/neutron/db/l3_db.py", line 205, in _update_router_gw_info
   l3_port_check=False)
TypeError: delete_port() got an unexpected keyword argument 'l3_port_check'

Revision history for this message
Anita Kuno (anteaya) wrote :

logstash fingerprint:
message "delete_port() got an unexpected keyword argument 'l3_port_check'" AND filename:"console.html"
http://bit.ly/1esexsm

Revision history for this message
Anita Kuno (anteaya) wrote :

updated logstash fingerprint:
message:"delete_port() got an unexpected keyword argument 'l3_port_check'" AND filename:"console.html" AND (build_name:"gate-neutron-python26" OR build_name:"gate-neutron-python27")
http://goo.gl/wFbs73

Matt Riedemann (mriedem)
Changed in neutron:
status: New → Confirmed
Revision history for this message
Isaku Yamahata (yamahata) wrote :

This is because TestL3GwModeMixin doesn't setup core_plugin.
So this test can be run against random core_plugin according to execution order.
When running only the test without other test, it fails as follows
(py26 is used in this example, but same with py27)

 tox -e py26 neutron.tests.unit.test_extension_ext_gw_mode

...
======================================================================
FAIL: neutron.tests.unit.test_extension_ext_gw_mode.TestL3GwModeMixin.test_update_router_gw_with_gw_info_none
tags: worker-11
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{2014-02-18 10:08:01,335 CRITICAL [neutron.manager] Neutron core_plugin not configured!}}}

Traceback (most recent call last):
  File "neutron/tests/unit/test_extension_ext_gw_mode.py", line 227, in test_update_router_gw_with_gw_info_none
    self._test_update_router_gw(None, True)
  File "neutron/tests/unit/test_extension_ext_gw_mode.py", line 214, in _test_update_router_gw
    self.context, self.router.id, gw_info)
  File "neutron/db/l3_gwmode_db.py", line 62, in _update_router_gw_info
    context, router_id, info, router=router)
  File "neutron/db/l3_db.py", line 202, in _update_router_gw_info
    self._core_plugin.delete_port(context.elevated(),
  File "neutron/db/l3_db.py", line 85, in _core_plugin
    return manager.NeutronManager.get_plugin()
  File "neutron/manager.py", line 214, in get_plugin
    return cls.get_instance().plugin
  File "neutron/manager.py", line 209, in get_instance
    cls._create_instance()
  File "neutron/openstack/common/lockutils.py", line 249, in inner
    return f(*args, **kwargs)
  File "neutron/manager.py", line 203, in _create_instance
    cls._instance = cls()
  File "neutron/manager.py", line 106, in __init__
    raise Exception(msg)
Exception: Neutron core_plugin not configured!
======================================================================
FAIL: process-returncode
tags: worker-11
----------------------------------------------------------------------
Binary content:
  traceback (test/plain; charset="utf8")
Ran 26 tests in 1.377s
FAILED (id=0, failures=2)
error: testr failed (1)
ERROR: InvocationError: '/home/yamahata/openstack/neutron/bug/neutron-test-extension-ext-gw-mode-0/.tox/py26/bin/python -m neutron.openstack.common.lockutils python setup.py testr --slowest --testr-args=neutron.tests.unit.test_extension_ext_gw_mode'
_____________________________________________________________________________ summary ______________________________________________________________________________
ERROR: py26: commands failed

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/74225

Changed in neutron:
assignee: nobody → Isaku Yamahata (yamahata)
status: Confirmed → In Progress
Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

unless you have a lot of CPUs, you need large enough concurrency to reproduce the problem.

eg.
tox -e py27 neutron.tests.unit.test_extension_ext_gw_mode -- --concurrency=64

Revision history for this message
Gary Duan (gduan) wrote :

This bug is causing jenkins failure, for example, in the following patch,

https://review.openstack.org/#/c/60699/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/74225
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9e247277e2d916fa705715e018ef5f3f221f0efa
Submitter: Jenkins
Branch: master

commit 9e247277e2d916fa705715e018ef5f3f221f0efa
Author: Isaku Yamahata <email address hidden>
Date: Tue Feb 18 11:02:56 2014 +0900

    tests/unit: Initialize core plugin in TestL3GwModeMixin

    TestL3GwModeMixin can fail randomly because it doesn't initialize
    core_plugin and can be run random core plugin depending on execution
    order of tests. It also fails with core plugin uninitialized when it
    is run without other tests.

    This patch refactors the setup code of core plugin and apply it to the
    related tests.
    This patch reveled the same bug of test_metaplugin.py which is also
    fixed by this patch.

    Closes-bug: #1273259
    Change-Id: I3c1d4d8b3d69262b89c7747daa8267bf2c8e7f6b

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
importance: Undecided → Low
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/85333

Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-3 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/havana)

Reviewed: https://review.openstack.org/85333
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=af5f2b938b65ff9078877223a4399784e315a445
Submitter: Jenkins
Branch: stable/havana

commit af5f2b938b65ff9078877223a4399784e315a445
Author: Isaku Yamahata <email address hidden>
Date: Tue Feb 18 11:02:56 2014 +0900

    tests/unit: Initialize core plugin in TestL3GwModeMixin

    TestL3GwModeMixin can fail randomly because it doesn't initialize
    core_plugin and can be run random core plugin depending on execution
    order of tests. It also fails with core plugin uninitialized when it
    is run without other tests.

    This patch refactors the setup code of core plugin and apply it to the
    related tests.
    This patch reveled the same bug of test_metaplugin.py which is also
    fixed by this patch.

    Closes-bug: #1273259

    Conflicts:
     neutron/tests/base.py
     neutron/tests/unit/test_extension_ext_gw_mode.py

    Change-Id: I3c1d4d8b3d69262b89c7747daa8267bf2c8e7f6b
    (cherry picked from commit 9e247277e2d916fa705715e018ef5f3f221f0efa)

tags: added: in-stable-havana
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.