[openstack-dev] [all][qa][glance] some recent tempest problems

Matt Riedemann mriedemos at gmail.com
Mon Jun 19 13:22:23 UTC 2017

On 6/16/2017 8:58 AM, Eric Harney wrote:
> I'm not convinced yet that this failure is purely Ceph-specific, at a
> quick look.
> I think what happens here is, unshelve performs an asynchronous delete
> of a glance image, and returns as successful before the delete has
> necessarily completed.  The check in tempest then sees that the image
> still exists, and fails -- but this isn't valid, because the unshelve
> API doesn't guarantee that this image is no longer there at the time it
> returns.  This would fail on any image delete that isn't instantaneous.
> Is there a guarantee anywhere that the unshelve API behaves how this
> tempest test expects it to?

There are no guarantees, no. The unshelve API reference is here [1]. The 
asynchronous postconditions section just says:

"After you successfully shelve a server, its status changes to ACTIVE. 
The server appears on the compute node.

The shelved image is deleted from the list of images returned by an API 

It doesn't say the image is deleted immediately, or that it waits for 
the image to be gone before changing the instance status to ACTIVE.

I see there is also a typo in there, that should say after you 
successfully *unshelve* a server.

 From an API user point of view, this is all asynchronous because it's 
an RPC cast from the nova-api service to the nova-conductor and finally 
nova-compute service when unshelving the instance.

So I think the test is making some wrong assumptions on how fast the 
image is going to be deleted when the instance is active.

As Ken'ichi pointed out in the Tempest change, Glance returns a 204 when 
deleting an image in the v2 API [2]. If the image delete is asynchronous 
then that should probably be a 202.

Either way the Tempest test should probably be in a wait loop for the 
image to be gone if it's really going to assert this.





More information about the OpenStack-dev mailing list