[openstack-dev] [all][qa][glance] some recent tempest problems
Ghanshyam Mann
ghanshyammann at gmail.com
Tue Jun 27 10:06:07 UTC 2017
On Mon, Jun 26, 2017 at 11:58 PM, Eric Harney <eharney at redhat.com> wrote:
> On 06/19/2017 09:22 AM, Matt Riedemann wrote:
>> 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
>> call."
>>
>> 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.
>>
>
> Thanks for confirming this.
>
> What do we need to do to get this fixed in Tempest? Nobody from Tempest
> Core has responded to the revert patch [3] since this explanation was
> posted.
>
> IMO we should revert this for now and someone can implement a fixed
> version if this test is needed.
Sorry for delay. Let's fix this instead of revert -
https://review.openstack.org/#/c/477821/
-gmann
>
> [3] https://review.openstack.org/#/c/471352/
>
>> [1]
>> https://developer.openstack.org/api-ref/compute/?expanded=unshelve-restore-shelved-server-unshelve-action-detail#unshelve-restore-shelved-server-unshelve-action
>>
>> [2]
>> https://developer.openstack.org/api-ref/image/v2/index.html?expanded=delete-an-image-detail#delete-an-image
>>
>>
>
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
More information about the OpenStack-dev
mailing list