Reviewed: https://review.openstack.org/97496 Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=3c7481f707263073ee72d84b17b0d1e407382116 Submitter: Jenkins Branch: master
commit 3c7481f707263073ee72d84b17b0d1e407382116 Author: Ken'ichi Ohmichi <oomi...@mxs.nes.nec.co.jp> Date: Tue Jun 3 22:19:02 2014 +0900 Wait for server activations for the updated servers In test_list_servers_by_changes_since, Tempest tries to get a server list with changes-since parameter. The test expects we can get all servers with the parameter, but sometimes we could not get it and the gate tests failed. On "create a server" API Nova creates a DB record of the server as the first step, then updates the record by each step(scheduling, networking, etc.) during the server creation. If the test runs just after the DB record creation, the record is not updated and "get a server list" API with changes-since parameter does not contain the server. As the result, the test fails. This patch makes the test wait for server activations to avoid the non-updated servers. Change-Id: I380ae2030da794c4f8fcfd6347f9cbe7f75b5c28 Closes-Bug: #1254238 ** Changed in: tempest Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1254238 Title: tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestXML.test_list_servers_by_changes_since failed in gate Status in OpenStack Compute (Nova): Confirmed Status in Tempest: Fix Released Bug description: http://logs.openstack.org/76/57976/4/check/check-tempest-devstack-vm- full/aedd197/ 2013-11-22 23:24:11.378 | ====================================================================== 2013-11-22 23:24:11.403 | FAIL: tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestXML.test_list_servers_by_changes_since[gate] 2013-11-22 23:24:11.403 | tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestXML.test_list_servers_by_changes_since[gate] 2013-11-22 23:24:11.404 | ---------------------------------------------------------------------- 2013-11-22 23:24:11.404 | _StringException: Empty attachments: 2013-11-22 23:24:11.404 | stderr 2013-11-22 23:24:11.405 | stdout 2013-11-22 23:24:11.405 | 2013-11-22 23:24:11.405 | pythonlogging:'': {{{ 2013-11-22 23:24:11.405 | 2013-11-22 23:10:02,203 Request: GET http://127.0.0.1:8774/v2/d3a946cc6dfa4233885bb3b9717419a0/servers?changes-since=2013-11-22T23%3A10%3A00.003311 2013-11-22 23:24:11.406 | 2013-11-22 23:10:02,203 Request Headers: {'Content-Type': 'application/xml', 'Accept': 'application/xml', 'X-Auth-Token': '<Token omitted>'} 2013-11-22 23:24:11.406 | 2013-11-22 23:10:02,396 Response Status: 200 2013-11-22 23:24:11.406 | 2013-11-22 23:10:02,397 Nova request id: req-a39d77f0-a38e-4c6f-a4e9-a27e21b52041 2013-11-22 23:24:11.407 | 2013-11-22 23:10:02,397 Response Headers: {'content-length': '926', 'content-location': u'http://127.0.0.1:8774/v2/d3a946cc6dfa4233885bb3b9717419a0/servers?changes-since=2013-11-22T23%3A10%3A00.003311', 'date': 'Fri, 22 Nov 2013 23:10:02 GMT', 'content-type': 'application/xml', 'connection': 'close'} 2013-11-22 23:24:11.407 | 2013-11-22 23:10:02,397 Response Body: <?xml version='1.0' encoding='UTF-8'?> 2013-11-22 23:24:11.407 | <servers xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1"><server name="ListServersNegativeTestXML-instance-tempest-1912778575" id="17b2a697-50bd-4bd9-b585-e5ac6c2b6a19"><atom:link href="http://127.0.0.1:8774/v2/d3a946cc6dfa4233885bb3b9717419a0/servers/17b2a697-50bd-4bd9-b585-e5ac6c2b6a19" rel="self"/><atom:link href="http://127.0.0.1:8774/d3a946cc6dfa4233885bb3b9717419a0/servers/17b2a697-50bd-4bd9-b585-e5ac6c2b6a19" rel="bookmark"/></server><server name="ListServersNegativeTestXML-instance-tempest-1925397957" id="8fedd4f4-2569-43c1-baee-025f911d0296"><atom:link href="http://127.0.0.1:8774/v2/d3a946cc6dfa4233885bb3b9717419a0/servers/8fedd4f4-2569-43c1-baee-025f911d0296" rel="self"/><atom:link href="http://127.0.0.1:8774/d3a946cc6dfa4233885bb3b9717419a0/servers/8fedd4f4-2569-43c1-baee-025f911d0296" rel="bookmark"/></server></servers> 2013-11-22 23:24:11.408 | }}} 2013-11-22 23:24:11.408 | 2013-11-22 23:24:11.408 | Traceback (most recent call last): 2013-11-22 23:24:11.409 | File "tempest/api/compute/servers/test_list_servers_negative.py", line 193, in test_list_servers_by_changes_since 2013-11-22 23:24:11.409 | (num_expected, body['servers'])) 2013-11-22 23:24:11.409 | File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 322, in assertEqual 2013-11-22 23:24:11.410 | self.assertThat(observed, matcher, message) 2013-11-22 23:24:11.410 | File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 412, in assertThat 2013-11-22 23:24:11.410 | raise MismatchError(matchee, matcher, mismatch, verbose) 2013-11-22 23:24:11.411 | MismatchError: 3 != 2: Number of servers 3 is wrong in [{'link': {'href': 'http://127.0.0.1:8774/d3a946cc6dfa4233885bb3b9717419a0/servers/17b2a697-50bd-4bd9-b585-e5ac6c2b6a19', 'rel': 'bookmark'}, 'name': 'ListServersNegativeTestXML-instance-tempest-1912778575', 'id': '17b2a697-50bd-4bd9-b585-e5ac6c2b6a19'}, {'link': {'href': 'http://127.0.0.1:8774/d3a946cc6dfa4233885bb3b9717419a0/servers/8fedd4f4-2569-43c1-baee-025f911d0296', 'rel': 'bookmark'}, 'name': 'ListServersNegativeTestXML-instance-tempest-1925397957', 'id': '8fedd4f4-2569-43c1-baee-025f911d0296'}] 2013-11-22 23:24:11.411 | 2013-11-22 23:24:11.411 | 2013-11-22 23:24:11.412 | ====================================================================== To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1254238/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp