Comment 0 for bug 1590049

Revision history for this message
Yaroslav Lobankov (ylobankov) wrote : test_add_list_remove_router_on_l3_agent doesn't work on envs where there is >= 2 L3 agents and DVR is enabled

Environment:
OpenStack (Mitaka release), where there is more than one L3 agent and enabled DVR extension.

The test_add_list_remove_router_on_l3_agent test may fail with the following error if we have more than one L3 agent in the cloud and enabled DVR extansion:

tempest.lib.exceptions.Conflict: An object with that identifier already exists
Details: {u'message': u'The router 8569d347-6db4-4e12-b033-60a867ba680f has been already hosted by the L3 Agent 6250d031-d455-4afe-b993-5a7719815746.', u'type': u'RouterHostedByL3Agent', u'detail': u''}

The full log you can find here http://paste.openstack.org/show/508686/

The test tries to add a router to L3 agent and fails because the router is already hosted by another L3 agent. A router is automatically hosted by some L3 agent after the router is created. When the DVR extension is enabled, a router is automatically hosted by some L3 agent after we added an internal network interface to the router.
In the resource_setup method we create a router that will be already hosted at least by one L3 agent before the test starts. The test works with one L3 agent because Neutron allows us to add a router to the same L3 agent.

Possible solutions:
1. Skip test when we have more than one L3 agent.
2. Remove the router from the L3 agent before we are going to add it to another (or the same) L3 agent.