← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1280489] [NEW] unit test test_router_add_interface_subnet_with_port_from_other_tenant is racey

 

Public bug reported:

2014-02-14 07:23:34.234 | DBError: (IntegrityError) foreign key constraint failed u'INSERT INTO neutron_nsx_network_mappings (neutron_id, nsx_id) VALUES (?, ?)' ('e9acb1c4-d3cd-4044-bd9b-4495320d4a18', u'3e7a28ae-9951-49b1-92b8-265b3cb697a8')
2014-02-14 07:23:34.234 | 2014-02-14 07:23:33,926    ERROR [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] No DHCP agents are associated with network 'aff5aa6e-023e-4ca4-bec6-a9ef547c0ed9'. Unable to send notification for 'network_create_end' with payload: {'network': {'status': 'ACTIVE', 'subnets': [], 'name': u'net1', 'admin_state_up': True, 'tenant_id': u'1f0fb8c0-11fe-48ad-9e7b-4d3879e39f23', 'shared': False, 'port_security_enabled': True, 'id': 'aff5aa6e-023e-4ca4-bec6-a9ef547c0ed9'}}
2014-02-14 07:23:34.234 | 2014-02-14 07:23:33,945    ERROR [neutron.api.v2.resource] create failed
2014-02-14 07:23:34.234 | Traceback (most recent call last):
2014-02-14 07:23:34.235 |   File "neutron/api/v2/resource.py", line 84, in resource
2014-02-14 07:23:34.235 |     result = method(request=request, **args)
2014-02-14 07:23:34.235 |   File "neutron/api/v2/base.py", line 411, in create
2014-02-14 07:23:34.235 |     obj = obj_creator(request.context, **kwargs)
2014-02-14 07:23:34.235 |   File "neutron/db/db_base_plugin_v2.py", line 1106, in create_subnet
2014-02-14 07:23:34.236 |     network = self._get_network(context, s["network_id"])
2014-02-14 07:23:34.236 |   File "neutron/db/db_base_plugin_v2.py", line 251, in _get_network
2014-02-14 07:23:34.236 |     raise q_exc.NetworkNotFound(net_id=id)
2014-02-14 07:23:34.236 | NetworkNotFound: Network e9acb1c4-d3cd-4044-bd9b-4495320d4a18 could not be found
2014-02-14 07:23:34.236 | 2014-02-14 07:23:34,035    ERROR [neutron.api.v2.resource] delete failed
2014-02-14 07:23:34.236 | Traceback (most recent call last):
2014-02-14 07:23:34.237 |   File "neutron/api/v2/resource.py", line 84, in resource
2014-02-14 07:23:34.237 |     result = method(request=request, **args)
2014-02-14 07:23:34.237 |   File "neutron/api/v2/base.py", line 426, in delete
2014-02-14 07:23:34.237 |     obj = self._item(request, id, parent_id=parent_id)
2014-02-14 07:23:34.237 |   File "neutron/api/v2/base.py", line 264, in _item
2014-02-14 07:23:34.237 |     obj = obj_getter(request.context, id, **kwargs)
2014-02-14 07:23:34.237 |   File "neutron/plugins/nicira/NeutronPlugin.py", line 1086, in get_network
2014-02-14 07:23:34.238 |     network = self._get_network(context, id)
2014-02-14 07:23:34.238 |   File "neutron/db/db_base_plugin_v2.py", line 251, in _get_network
2014-02-14 07:23:34.238 |     raise q_exc.NetworkNotFound(net_id=id)
2014-02-14 07:23:34.238 | NetworkNotFound: Network e9acb1c4-d3cd-4044-bd9b-4495320d4a18 could not be found
2014-02-14 07:23:34.238 | }}}
2014-02-14 07:23:34.238 | 
2014-02-14 07:23:34.239 | Traceback (most recent call last):
2014-02-14 07:23:34.239 |   File "neutron/tests/unit/test_l3_plugin.py", line 772, in test_router_add_interface_subnet_with_port_from_other_tenant
2014-02-14 07:23:34.239 |     None)
2014-02-14 07:23:34.239 |   File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
2014-02-14 07:23:34.239 |     self.gen.throw(type, value, traceback)
2014-02-14 07:23:34.239 |   File "/usr/lib/python2.7/contextlib.py", line 121, in nested
2014-02-14 07:23:34.239 |     if exit(*exc):
2014-02-14 07:23:34.240 |   File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
2014-02-14 07:23:34.240 |     self.gen.throw(type, value, traceback)
2014-02-14 07:23:34.240 |   File "neutron/tests/unit/test_db_plugin.py", line 532, in network
2014-02-14 07:23:34.240 |     self._delete('networks', network['network']['id'])
2014-02-14 07:23:34.240 |   File "neutron/tests/unit/test_db_plugin.py", line 448, in _delete
2014-02-14 07:23:34.240 |     self.assertEqual(res.status_int, expected_code)
2014-02-14 07:23:34.240 |   File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
2014-02-14 07:23:34.241 |     self.assertThat(observed, matcher, message)
2014-02-14 07:34:33.426 |   File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
2014-02-14 07:34:33.427 |     raise mismatch_error
2014-02-14 07:34:33.427 | MismatchError: 404 != 204

http://logs.openstack.org/07/60207/17/check/gate-neutron-
python27/0f54852/console.html

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1280489

Title:
  unit test
  test_router_add_interface_subnet_with_port_from_other_tenant is racey

Status in OpenStack Neutron (virtual network service):
  New

Bug description:
  2014-02-14 07:23:34.234 | DBError: (IntegrityError) foreign key constraint failed u'INSERT INTO neutron_nsx_network_mappings (neutron_id, nsx_id) VALUES (?, ?)' ('e9acb1c4-d3cd-4044-bd9b-4495320d4a18', u'3e7a28ae-9951-49b1-92b8-265b3cb697a8')
  2014-02-14 07:23:34.234 | 2014-02-14 07:23:33,926    ERROR [neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api] No DHCP agents are associated with network 'aff5aa6e-023e-4ca4-bec6-a9ef547c0ed9'. Unable to send notification for 'network_create_end' with payload: {'network': {'status': 'ACTIVE', 'subnets': [], 'name': u'net1', 'admin_state_up': True, 'tenant_id': u'1f0fb8c0-11fe-48ad-9e7b-4d3879e39f23', 'shared': False, 'port_security_enabled': True, 'id': 'aff5aa6e-023e-4ca4-bec6-a9ef547c0ed9'}}
  2014-02-14 07:23:34.234 | 2014-02-14 07:23:33,945    ERROR [neutron.api.v2.resource] create failed
  2014-02-14 07:23:34.234 | Traceback (most recent call last):
  2014-02-14 07:23:34.235 |   File "neutron/api/v2/resource.py", line 84, in resource
  2014-02-14 07:23:34.235 |     result = method(request=request, **args)
  2014-02-14 07:23:34.235 |   File "neutron/api/v2/base.py", line 411, in create
  2014-02-14 07:23:34.235 |     obj = obj_creator(request.context, **kwargs)
  2014-02-14 07:23:34.235 |   File "neutron/db/db_base_plugin_v2.py", line 1106, in create_subnet
  2014-02-14 07:23:34.236 |     network = self._get_network(context, s["network_id"])
  2014-02-14 07:23:34.236 |   File "neutron/db/db_base_plugin_v2.py", line 251, in _get_network
  2014-02-14 07:23:34.236 |     raise q_exc.NetworkNotFound(net_id=id)
  2014-02-14 07:23:34.236 | NetworkNotFound: Network e9acb1c4-d3cd-4044-bd9b-4495320d4a18 could not be found
  2014-02-14 07:23:34.236 | 2014-02-14 07:23:34,035    ERROR [neutron.api.v2.resource] delete failed
  2014-02-14 07:23:34.236 | Traceback (most recent call last):
  2014-02-14 07:23:34.237 |   File "neutron/api/v2/resource.py", line 84, in resource
  2014-02-14 07:23:34.237 |     result = method(request=request, **args)
  2014-02-14 07:23:34.237 |   File "neutron/api/v2/base.py", line 426, in delete
  2014-02-14 07:23:34.237 |     obj = self._item(request, id, parent_id=parent_id)
  2014-02-14 07:23:34.237 |   File "neutron/api/v2/base.py", line 264, in _item
  2014-02-14 07:23:34.237 |     obj = obj_getter(request.context, id, **kwargs)
  2014-02-14 07:23:34.237 |   File "neutron/plugins/nicira/NeutronPlugin.py", line 1086, in get_network
  2014-02-14 07:23:34.238 |     network = self._get_network(context, id)
  2014-02-14 07:23:34.238 |   File "neutron/db/db_base_plugin_v2.py", line 251, in _get_network
  2014-02-14 07:23:34.238 |     raise q_exc.NetworkNotFound(net_id=id)
  2014-02-14 07:23:34.238 | NetworkNotFound: Network e9acb1c4-d3cd-4044-bd9b-4495320d4a18 could not be found
  2014-02-14 07:23:34.238 | }}}
  2014-02-14 07:23:34.238 | 
  2014-02-14 07:23:34.239 | Traceback (most recent call last):
  2014-02-14 07:23:34.239 |   File "neutron/tests/unit/test_l3_plugin.py", line 772, in test_router_add_interface_subnet_with_port_from_other_tenant
  2014-02-14 07:23:34.239 |     None)
  2014-02-14 07:23:34.239 |   File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
  2014-02-14 07:23:34.239 |     self.gen.throw(type, value, traceback)
  2014-02-14 07:23:34.239 |   File "/usr/lib/python2.7/contextlib.py", line 121, in nested
  2014-02-14 07:23:34.239 |     if exit(*exc):
  2014-02-14 07:23:34.240 |   File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
  2014-02-14 07:23:34.240 |     self.gen.throw(type, value, traceback)
  2014-02-14 07:23:34.240 |   File "neutron/tests/unit/test_db_plugin.py", line 532, in network
  2014-02-14 07:23:34.240 |     self._delete('networks', network['network']['id'])
  2014-02-14 07:23:34.240 |   File "neutron/tests/unit/test_db_plugin.py", line 448, in _delete
  2014-02-14 07:23:34.240 |     self.assertEqual(res.status_int, expected_code)
  2014-02-14 07:23:34.240 |   File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
  2014-02-14 07:23:34.241 |     self.assertThat(observed, matcher, message)
  2014-02-14 07:34:33.426 |   File "/home/jenkins/workspace/gate-neutron-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
  2014-02-14 07:34:33.427 |     raise mismatch_error
  2014-02-14 07:34:33.427 | MismatchError: 404 != 204

  http://logs.openstack.org/07/60207/17/check/gate-neutron-
  python27/0f54852/console.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1280489/+subscriptions


Follow ups

References