Comment 0 for bug 1255421

Revision history for this message
Akihiro Motoki (amotoki) wrote :

In the unit test, ovs-vsctl command is unexpectedly called in ryu plugin test.

It occurs in the latest master branch.
In gating test, the followings hit this issue:
http://logs.openstack.org/70/58270/2/check/gate-neutron-python27/79ef6dd/console.html
http://logs.openstack.org/25/58125/4/check/gate-neutron-python27/2cc0dc5/console.html#_2013-11-27_01_46_09_003

According to the result of debugging by adding print_traceback in ovs_lib.OVSBridge.get_vif_port_by_id,
the following tests fails and the following stack trace is got:

neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port_update_ip_address_only
neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port
neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port_update_ips
neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port_delete_ip
neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port_add_additional_ip
neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port_not_admin
neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port_update_ip

  File "/home/ubuntu/neutron/.venv/local/lib/python2.7/site-packages/eventlet/greenthread.py", line 194, in main
    result = function(*args, **kwargs)
  File "neutron/openstack/common/rpc/impl_fake.py", line 67, in _inner
    namespace, **args)
  File "neutron/openstack/common/rpc/dispatcher.py", line 172, in dispatch
    result = getattr(proxyobj, method)(ctxt, **kwargs)
  File "neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 296, in port_update
    vif_port = self.int_br.get_vif_port_by_id(port['id'])
  File "neutron/agent/linux/ovs_lib.py", line 362, in get_vif_port_by_id
    print traceback.print_stack()

More intersting thing is that it occurs only when both OVS plugin test and Ryu plugin test are run.
More precisely, it happens when we run
- first neutron.tests.unit.openvswitch.test_ovs_neutron_agent.TestOvsNeutronAgent, and
- then neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port

$ source .venv/bin/activate
$ OS_DEBUG=1 python setup.py testr --testr-args='--concurrency=4 neutron.tests.unit.openvswitch.test_ovs_neutron_agent.TestOvsNeutronAgent neutron.tests.unit.ryu.test_ryu_plugin.TestRyuPortsV2.test_update_port'