Improper handling of return code 202 in some cases

Bug #1007447 reported by David Kranz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
High
David Kranz

Bug Description

There are some race conditions in the code caused by the following type of sequence:

1. Delete a resource
2. Verify 202 is returned
3. Assert that a listing of the resource class does not contain the deleted resource

This is not right because 202 means there is no guarantee that the delete will be acted on immediately. They need to loop for some time waiting for the deletion. We have code that waits for a server to be deleted and this is the same issue. I got a test failure for the one at test_floating_ips_actions.py:83 but the following also looks wrong:

test_volumes_get:55

Revision history for this message
Jay Pipes (jaypipes) wrote :

David, want to give this one a hack?

Changed in tempest:
status: New → Triaged
importance: Undecided → High
Changed in tempest:
assignee: nobody → David Kranz (david-kranz)
Revision history for this message
David Kranz (david-kranz) wrote :

There are also tests that check for 202 but do not check that the operation actually ever happens. They really should. Also, I am not sure what the timeout for a 202 action should be. Surely much shorter than the build timeout. I am going to hard code it to 10s which is on the high side. I don't think these should take much time at all unless the system is seriously more overloaded than it should be when running tempest. Any one have any contrary opinions?

Revision history for this message
Jay Pipes (jaypipes) wrote :

I would just leave the delete status timeout as the same as the build timeout... we can always set build_interval to something like 2 seconds, which on my local box speeds up the test runs by about 20% :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

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

Reviewed: https://review.openstack.org/8193
Committed: http://github.com/openstack/tempest/commit/6aceb4addcb1a91489f1ab4d71687b939cfe4bb2
Submitter: Jenkins
Branch: master

commit 6aceb4addcb1a91489f1ab4d71687b939cfe4bb2
Author: David Kranz <email address hidden>
Date: Tue Jun 5 14:05:45 2012 -0400

    Wait for resource deletion after 202 response. Fixes bug 1007447.

    Added RestClient.wait_for_resource_deletion that waits for a subclass-specific condition.
    Added RestClient.is_resource_deleted that implements a subclass-specific deletion predicate.
    Removed redundant test by combining floating_ip associate/dissacociate into a single test.

    Change-Id: Iac043b12e8d5a5e88786e3b573280bfbc3f6a8d6

Changed in tempest:
status: In Progress → Fix Committed
Jay Pipes (jaypipes)
Changed in tempest:
status: Fix Committed → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
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.