shelve unittest flakey fail

Bug #1256210 reported by Christopher Yeoh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Christopher Yeoh

Bug Description

Looks like there is a timing issue with nova.tests.integrated.v3.test_shelve.ShelveXmlTest.test_shelve_offload

INFO [nova.tests.integrated.api.client] Doing POST on /v3/servers
INFO [nova.tests.integrated.api.client] Body: <?xml version="1.0" encoding="UTF-8"?>
<server xmlns="http://docs.openstack.org/compute/api/v1.1" image_ref="http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b" flavor_ref="http://openstack.example.com/flavors/1" name="new-server-test">
  <metadata>
    <meta key="My Server Name">Apache1</meta>
  </metadata>
  <personality>
    <file path="/etc/banner.txt">
        ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
        dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k
        IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs
        c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g
        QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo
        ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv
        dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy
        c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6
        b25zLiINCg0KLVJpY2hhcmQgQmFjaA==
    </file>
  </personality>
</server>
INFO [nova.osapi_compute.wsgi.server] (9819) accepted ('127.0.0.1', 44341)

AUDIT [nova.compute.manager] Starting instance...
AUDIT [nova.compute.claims] Attempting claim: memory 512 MB, disk 1 GB, VCPUs 1
AUDIT [nova.compute.claims] Total Memory: 8192 MB, used: 512.00 MB
AUDIT [nova.compute.claims] Memory limit not specified, defaulting to unlimited
AUDIT [nova.compute.claims] Total Disk: 1028 GB, used: 0.00 GB
AUDIT [nova.compute.claims] Disk limit not specified, defaulting to unlimited
AUDIT [nova.compute.claims] Total CPU: 1 VCPUs, used: 0.00 VCPUs
AUDIT [nova.compute.claims] CPU limit not specified, defaulting to unlimited
AUDIT [nova.compute.claims] Claim successful
INFO [nova.osapi_compute.wsgi.server] 127.0.0.1 "POST /v3/servers HTTP/1.1" status: 202 len: 712 time: 1.0159640

INFO [nova.tests.integrated.api.client] Doing POST on /v3/servers/67640a75-d7cd-4d96-91a4-b26e28485aa0/action
INFO [nova.tests.integrated.api.client] Body: <?xml version="1.0" encoding="UTF-8"?>
    <shelve/>
INFO [nova.osapi_compute.wsgi.server] (9819) accepted ('127.0.0.1', 44348)

INFO [nova.osapi_compute.wsgi.server] 127.0.0.1 "POST /v3/servers/67640a75-d7cd-4d96-91a4-b26e28485aa0/action HTTP/1.1" status: 202 len: 185 time: 0.3799698

INFO [nova.tests.integrated.api.client] Doing POST on /v3/servers/67640a75-d7cd-4d96-91a4-b26e28485aa0/action
INFO [nova.tests.integrated.api.client] Body: <?xml version="1.0" encoding="UTF-8"?>
    <shelve_offload/>
INFO [nova.osapi_compute.wsgi.server] (9819) accepted ('127.0.0.1', 44350)

INFO [nova.api.openstack.wsgi] HTTP exception thrown: Cannot 'shelve_offload' while instance is in vm_state shelved_offloaded
INFO [nova.osapi_compute.wsgi.server] 127.0.0.1 "POST /v3/servers/67640a75-d7cd-4d96-91a4-b26e28485aa0/action HTTP/1.1" status: 409 len: 386 time: 0.0510960

INFO [nova.wsgi] Stopping WSGI server.
}}}

Traceback (most recent call last):
  File "nova/tests/integrated/v3/test_shelve.py", line 46, in test_shelve_offload
    self._test_server_action(uuid, 'shelve_offload')
  File "nova/tests/integrated/v3/test_shelve.py", line 36, in _test_server_action
    self.assertEqual(response.status, 202)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 322, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 412, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: 409 != 202

Full logs here:

http://logs.openstack.org/66/55766/3/gate/gate-nova-python27/8a3f3bc/testr_results.html.gz

Tags: api
tags: added: api
Changed in nova:
assignee: nobody → Christopher Yeoh (cyeoh-0)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/59142

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/59142
Committed: http://github.com/openstack/nova/commit/c7367823fdc1a55d515e8cbf9532e7ebbc641d7c
Submitter: Jenkins
Branch: master

commit c7367823fdc1a55d515e8cbf9532e7ebbc641d7c
Author: Chris Yeoh <email address hidden>
Date: Fri Nov 29 19:38:19 2013 +1030

    Fix testcase config option imports

    Fixes some testcases where config options were used before they
    were guaranteed to be imported. This was causing intermittent
    failures of tests such as test_shelve_offload.

    Closes-Bug: 1256210

    Change-Id: Id0204d67f35cb098a4ddfb670f5968e76b327705

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.