Bug 1436579 - [Newton] neutron.tests.tempest.api.admin.test_l3_agent_scheduler.L3AgentSchedulerTestJSON.test_add_list_remove_router_on_l3_agent
Summary: [Newton] neutron.tests.tempest.api.admin.test_l3_agent_scheduler.L3AgentSched...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z7
: 10.0 (Newton)
Assignee: Daniel Alvarez Sanchez
QA Contact: Toni Freger
URL:
Whiteboard:
Depends On: 1436576
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-28 08:51 UTC by Eran Kuris
Modified: 2018-02-27 16:41 UTC (History)
8 users (show)

Fixed In Version: openstack-neutron-9.4.1-7.el7ost
Doc Type: Bug Fix
Doc Text:
Previously for DVR deployments, the 'test_add_list_remove_router_on_l3_agent' function from 'test_l3_agent_scheduler.py' would not finish successfully. When a new router was created, the testing procedure tried to bind a network interface to an L3 agent, even though the interface had previously been bound to one. With this update, the interface will not be added to the router and assigned to the L3 agent until the test does so. As a result, the test finishes successfully.
Clone Of: 1436576
Environment:
Last Closed: 2018-02-27 16:41:21 UTC
Target Upstream Version:
Embargoed:
dalvarez: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1662462 0 None None None 2017-03-28 08:51:06 UTC
Red Hat Product Errata RHBA-2018:0357 0 normal SHIPPED_LIVE openstack-neutron bug fix advisory 2018-02-27 21:38:41 UTC

Description Eran Kuris 2017-03-28 08:51:06 UTC
+++ This bug was initially created as a clone of Bug #1436576 +++

Description of problem:
The failing test is "test_add_list_remove_router_on_l3_agent" in neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py

The test suite's setUp creates a router and if it's a dvr router (which it is in this case) it also uses 'router-gateway-set' to ensure it's scheduled. Then, the test itself tries to schedule the router to an agent. This will fail if the agent that was scheduled to during setUp is different than the one that's attempted to be scheduled to during the test itself.

In other words, the test is faulty in that it should know that the router is already scheduled.

The failure happens in Mitaka and Neuton version when running on DVR setup
Stacktrace

Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
2017-03-24 21:34:26,554 7724 INFO     [tempest.lib.common.rest_client] Request (L3AgentSchedulerTestJSON:test_add_list_remove_router_on_l3_agent): 409 POST http://10.0.0.107:9696/v2.0/agents/397fef47-1243-485e-9189-38842e0b2d77/l3-routers 0.353s
2017-03-24 21:34:26,555 7724 DEBUG    [tempest.lib.common.rest_client] Request - Headers: {'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Auth-Token': '<omitted>'}
        Body: {"router_id": "3c6003e9-d81e-4287-8a77-603f22b3b27b"}
    Response - Headers: {'status': '409', u'content-length': '205', 'content-location': 'http://10.0.0.107:9696/v2.0/agents/397fef47-1243-485e-9189-38842e0b2d77/l3-routers', u'date': 'Sat, 25 Mar 2017 01:34:27 GMT', u'content-type': 'application/json', u'connection': 'close', u'x-openstack-request-id': 'req-0f7b896c-7a3a-4c9e-9155-c2faa610d5ff'}
        Body: {"NeutronError": {"message": "The router 3c6003e9-d81e-4287-8a77-603f22b3b27b has been already hosted by the L3 Agent 9e974922-85c2-457c-a791-8fa4c97cf25e.", "type": "RouterHostedByL3Agent", "detail": ""}}
}}}

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/api/admin/test_l3_agent_scheduler.py", line 91, in test_add_list_remove_router_on_l3_agent
    self.router['id'])
  File "/usr/lib/python2.7/site-packages/neutron/tests/tempest/services/network/json/network_client.py", line 471, in add_router_to_l3_agent
    resp, body = self.post(uri, body)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 276, in post
    return self.request('POST', url, extra_headers, headers, body, chunked)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 665, in request
    self._error_checker(resp, resp_body)
  File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 777, in _error_checker
    raise exceptions.Conflict(resp_body, resp=resp)
tempest.lib.exceptions.Conflict: An object with that identifier already exists
Details: {u'message': u'The router 3c6003e9-d81e-4287-8a77-603f22b3b27b has been already hosted by the L3 Agent 9e974922-85c2-457c-a791-8fa4c97cf25e.', u'type': u'RouterHostedByL3Agent', u'detail': u''}


Version-Release number of selected component (if applicable):
python-neutron-10.0.0-8.el7ost.noarch
openstack-neutron-10.0.0-8.el7ost.noarch
python-neutronclient-6.1.0-1.el7ost.noarch
puppet-neutron-10.3.0-1.el7ost.noarch
python-neutron-lib-1.1.0-1.el7ost.noarch
How reproducible:
 Failed 4 times in the last 7 runs. Stability: 42 %

Steps to Reproduce:
1.run ci gate: https://rhos-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/view/RHOS/view/RHOS11/job/qe-DFG-neutron-11_director-rhel-7.3-virthost-3cont_2comp-ipv4-vxlan-lvm-lbaas-dvr
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 errata-xmlrpc 2018-02-27 16:41:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0357


Note You need to log in before you can comment on or make changes to this bug.