Description of problem: tempest.api.compute.servers.test_attach_interfaces.AttachInterfacesTestJSON.test_create_list_show_delete_interfaces_by_fixed_ip fails with PortNotFound. {0} tempest.api.compute.servers.test_attach_interfaces.AttachInterfacesTestJSON.test_create_list_show_delete_interfaces_by_fixed_ip [31.467092s] ... FAILED Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/tempest/lib/services/network/ports_client.py", line 59, in delete_port return self.delete_resource(uri) File "/usr/lib/python2.7/site-packages/tempest/lib/services/network/base.py", line 41, in delete_resource resp, body = self.delete(req_uri) File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 310, in delete return self.request('DELETE', url, extra_headers, headers, body) File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 668, in request self._error_checker(resp, resp_body) File "/usr/lib/python2.7/site-packages/tempest/lib/common/rest_client.py", line 774, in _error_checker raise exceptions.NotFound(resp_body, resp=resp) tempest.lib.exceptions.NotFound: Object not found Details: {u'message': u'Port 80e25e0d-d4ee-41b6-9e11-91917a4494ab could not be found.', u'type': u'PortNotFound', u'detail': u''} Version-Release number of selected component (if applicable): How reproducible: Everytime when the test is run. Steps to Reproduce: 1. Configure tempest and run the test. Actual results: The test is always failed with PortNotFound. Expected results: The test doesn't failed. Additional info: From the log, the tempest tries to list the deleted interface. It looks that the test procedure is wrong or it should pass the PortNotFound error if the code intends to check whether the port is successfully deleted.
Hi, what I get from tempest code: The test creates a port [1] and a port with fixed ip [2]. When a port with fixed ip is created, it's added to cleanup list (so that it can be deleted after the test is finished) [3]. The test after some checks deletes a port [4] - I believe it's meant to delete the first port created. In my environment the test always passed, I wasn't able to reproduce it. However I compared the log with yours. In my case, the test creates port A, then creates port B with fixed ip. Then the test deletes port A and port B is deleted after the test is finished - in a cleanup method. The cleanup method deletes the port B because it was added to a cleanup list as I mentioned above. What I see in your tempest.log is, that the first port wasn't created - it ended with 400. Then a second port with fixed ip is created. Now when the test tries to delete the first port, it deletes the second one by mistake. The test continues and in cleanup the cleanup method deletes the last port added, which is the one with fixed ip, which is already deleted by mistake -> This ends with PortNotFound error. So I assume, if the first port was created successfully, the test would pass. So if we find out why the creation of the first port failed, we may solve the whole issue. In your case, the port creation ended with error: "Multiple possible networks found, use a Network ID to be more specific." I don't understand why the test didn't fail in that part of the code, but continued instead. According to this [5] statement, if your tempest.conf doesn't contain compute.fixed_network_name the test should failed there. However it continued which leads me to a question, if the tempest.conf you provided is really the one which was used when the test failed. Then another weird thing is, why the test complained about multiple networks however I don't see multiple networks set in your tempest.conf. [1] https://github.com/openstack/tempest/blob/615e63b77c35389532a0a1e4706861561f6dee85/tempest/api/compute/servers/test_attach_interfaces.py#L239 [2] https://github.com/openstack/tempest/blob/615e63b77c35389532a0a1e4706861561f6dee85/tempest/api/compute/servers/test_attach_interfaces.py#L248 [3] https://github.com/openstack/tempest/blob/615e63b77c35389532a0a1e4706861561f6dee85/tempest/api/compute/servers/test_attach_interfaces.py#L126 [4] https://github.com/openstack/tempest/blob/615e63b77c35389532a0a1e4706861561f6dee85/tempest/api/compute/servers/test_attach_interfaces.py#L257 [5] https://github.com/openstack/tempest/blob/615e63b77c35389532a0a1e4706861561f6dee85/tempest/api/compute/servers/test_attach_interfaces.py#L243
Oh, I couldn't reproduce the issue, because I had only one network created. If I create a new shared private network, I hit the issue too. It seems the problem is that the network is shared. If I set is as --no-share, the test passes. If I specify network.fixed_network_name to point to my public network, the test still discovers the other shared network and fails with the error message. So at the end, it is really a tempest bug, because I used network.fixed_network_name and network.public_network_id to point to my network as the error message suggests and the test is still failing with the same message: "Multiple possible networks found, use a Network ID to be more specific."
Hello Martin, Do you have an update on this bugzilla? Best Regards, Keigo Noha
Hello Keigo, sorry, no updates yet. This issue needs to be fixed upstream first - the launchpad bug is attached. According to PTG discussions, the work on that bug is planned for this sprint. Regards, Martin
The bug has been merged upstream, moving to POST.
The fix for the issue is present in openstack-tempest-18.0.0-5.el7ost package, which is available in the latest puddles (since 2018-12-07). [stack@undercloud-0 test_old]$ rpm -qa | grep tempest openstack-tempest-18.0.0-5.el7ost.noarch python2-horizon-tests-tempest-0.0.1-0.20180219094157.a23f407.el7ost.noarch python2-tempest-18.0.0-5.el7ost.noarch python2-tempest-tests-18.0.0-5.el7ost.noarch python2-tempestconf-2.0.0-1.el7ost.noarch [stack@undercloud-0 test_old]$ tempest run --regex tempest.api.compute.servers.test_attach_interfaces.AttachInterfacesTestJSON.test_create_list_show_delete_interfaces_by_fixed_ip /usr/lib/python2.7/site-packages/paramiko/rsakey.py:119: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead. algorithm=hashes.SHA1(), {0} tempest.api.compute.servers.test_attach_interfaces.AttachInterfacesTestJSON.test_create_list_show_delete_interfaces_by_fixed_ip [33.088180s] ... ok ====== Totals ====== Ran: 1 tests in 50.0000 sec. - Passed: 1 - Skipped: 0 - Expected Fail: 0 - Unexpected Success: 0 - Failed: 0 Sum of execute time for each test: 33.0882 sec. ============== Worker Balance ============== - Worker 0 (1 tests) => 0:00:33.088180
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-2019:0088