test_nexus_plugin.py duplicate values causes tests to fail.

Bug #1234012 reported by Sean McCully
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Sean McCully

Bug Description

======================================================================
ERROR: neutron.tests.unit.cisco.test_nexus_plugin.TestCiscoNexusPlugin.test_nexus_add_remove_router_interface
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/tests/unit/cisco/test_nexus_plugin.py", line 245, in test_nexus_add_remove_router_interface
    router_id)
  File "/home/smccully/projects/launchpad-workflow/neutron/neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py", line 191, in add_router_interface
    router_id=router_id)
SubnetInterfacePresent: Subnet 00001 has an interface on 00000R1.

----------------------------------------------------------------------
Ran 601 tests in 99.274s

https://review.openstack.org/#/c/49023/6

Tags: cisco
Changed in neutron:
assignee: nobody → Sean McCully (sean-mccully)
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/49317

Changed in neutron:
status: New → In Progress
Revision history for this message
ZhiQiang Fan (aji-zqfan) wrote :

$ git pull --ff-only origin master
From https://github.com/openstack/neutron
 * branch master -> FETCH_HEAD
Updating 6d089df..7da3d24
Fast-forward
...
$ git log --pretty="%h %s" | head -5
7da3d24 Cisco plugin should check for switch - vlan bindings
b94a602 Merge "Increase number of concurrent_connections to nvp"
6d089df Merge "Imported Translations from Transifex"
88daf83 Merge "Improve ml2_conf.ini"
646cd75 Merge "Fix to enable delete of firewall in PENDING_CREATE state"

$ tox -epy27 test_nexus_plugin
Ran 18 (-144) tests in 0.660s (-3.415s)
___________________________________ summary ____________________________________
  py27: commands succeeded
  congratulations :)

$ tox -r -epy27 test_nexus_plugin
Ran 19 (+10) tests in 0.889s (+0.242s)
FAILED (id=340, failures=2 (+2))
error: testr failed (1)
___________________________________summary_____________________________________
ERROR: py27: commands failed

confirmed, must use tox -r to reproduce

Changed in neutron:
importance: Undecided → Medium
tags: added: cisco
Revision history for this message
Sean McCully (sean-mccully) wrote :

@ZhiQian,

From what I understand Tox is a lot more then a test runner.

$ nosetests neutron/tests/unit/cisco/test_nexus_plugin.py
.......EE
======================================================================
ERROR: neutron.tests.unit.cisco.test_nexus_plugin.TestCiscoNexusPlugin.test_nexus_add_remove_router_interface
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/home/smccully/projects/launchpad-workflow/neutron-2/neutron/tests/unit/cisco/test_nexus_plugin.py", line 249, in test_nexus_add_remove_router_interface
    router_id)
  File "/home/smccully/projects/launchpad-workflow/neutron-2/neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py", line 191, in add_router_interface
    router_id=router_id)
SubnetInterfacePresent: Subnet 00001 has an interface on 00000R1.

======================================================================
ERROR: neutron.tests.unit.cisco.test_nexus_plugin.TestCiscoNexusPlugin.test_nexus_add_router_interface_fail
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:''

Traceback (most recent call last):
  File "/home/smccully/projects/launchpad-workflow/neutron-2/neutron/tests/unit/cisco/test_nexus_plugin.py", line 267, in test_nexus_add_router_interface_fail
    router_id)
  File "/home/smccully/projects/launchpad-workflow/neutron-2/neutron/plugins/cisco/nexus/cisco_nexus_plugin_v2.py", line 191, in add_router_interface
    router_id=router_id)
SubnetInterfacePresent: Subnet 00001 has an interface on 00000R1.

----------------------------------------------------------------------
Ran 9 tests in 0.127s

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

Reviewed: https://review.openstack.org/49317
Committed: http://github.com/openstack/neutron/commit/b4167ed095dbd47a137ff22674ae13aba3a50513
Submitter: Jenkins
Branch: master

commit b4167ed095dbd47a137ff22674ae13aba3a50513
Author: Sean McCully <email address hidden>
Date: Wed Oct 2 02:36:05 2013 -0500

    Add clear_db to cleanup for TestCiscoNexusPlugin

    Fixes Bug: #1234012
    Change-Id: I0829f04ac1a0760d96babcb1154f4f569a0f848f

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This sometimes causes unit test failures. Add havana-rc-potential tag.

tags: added: havana-rc-potential
Revision history for this message
Akihiro Motoki (amotoki) wrote :

At now, the unit test in milestone-proposed branch does not fail, but it is fragile and potentially any unit test change leads to this bug. It seems it depends on the concurrency level of testr whether the bug occurs or not.

I ran neutron.tests.unit.cisco with various concurrency level. The result was interesting.
It failed with concurrency 1, 3 and succeeded with concurrency 2, 4.

I used commit 3375f66b9f186ec095d22060cea987697426de79 in milestone-proposed branch.
The following is what I did.

  ./run_tests.sh -p (<--- to create .venv)
  source .venv/bin/activate
  python setup.py testr --testr-args='--concurrency=N neutron.tests.unit.cisco' (<--- N=1 to 4)

I believe it is worth backporting to milestone-proposed.

Changed in neutron:
milestone: none → havana-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/50649

tags: removed: havana-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (milestone-proposed)

Reviewed: https://review.openstack.org/50649
Committed: http://github.com/openstack/neutron/commit/b4c2db5ea0ed3116de49b69dae4c4f6c9114a152
Submitter: Jenkins
Branch: milestone-proposed

commit b4c2db5ea0ed3116de49b69dae4c4f6c9114a152
Author: Sean McCully <email address hidden>
Date: Wed Oct 2 02:36:05 2013 -0500

    Add clear_db to cleanup for TestCiscoNexusPlugin

    Fixes Bug: #1234012
    Change-Id: I0829f04ac1a0760d96babcb1154f4f569a0f848f
    (cherry picked from commit b4167ed095dbd47a137ff22674ae13aba3a50513)

Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc2 → 2013.2
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.