commit 0d4551b367c9d3f37117a5426a9ca500d791ac25
Author: Matt Riedemann <email address hidden>
Date: Tue Oct 10 13:00:48 2017 -0400
Only attempt to detach an in-use volume during cleanup
test_list_get_volume_attachments intermittently fails
during cleanup because it tries to detach an already
detached volume, which results in a 400 response.
Tempest, as the client, should be checking the volume
status before making the detach request. The only reason
this ever worked before Pike was because of some
(incorrect) ordering of operations in the compute
service which affected how the API behaved during detach,
and the compute API would return a 404 rather than a 400.
That changed with I2581ff9f9c0e7cfc14a25acf45eb1860df69eacf
in Pike, which exposed the race on the Tempest side by
deleting the BDM in nova *after* marking the volume as
'available' in Cinder, and the os-volume_attachments API
checks for the existence of the BDM and if it exists, attempts
the detach (which then fails with the 400 from Cinder).
Reviewed: https:/ /review. openstack. org/510951 /git.openstack. org/cgit/ openstack/ tempest/ commit/ ?id=0d4551b367c 9d3f37117a5426a 9ca500d791ac25
Committed: https:/
Submitter: Jenkins
Branch: master
commit 0d4551b367c9d3f 37117a5426a9ca5 00d791ac25
Author: Matt Riedemann <email address hidden>
Date: Tue Oct 10 13:00:48 2017 -0400
Only attempt to detach an in-use volume during cleanup
test_ list_get_ volume_ attachments intermittently fails
during cleanup because it tries to detach an already
detached volume, which results in a 400 response.
Tempest, as the client, should be checking the volume
status before making the detach request. The only reason
this ever worked before Pike was because of some
(incorrect) ordering of operations in the compute
service which affected how the API behaved during detach,
and the compute API would return a 404 rather than a 400.
That changed with I2581ff9f9c0e7c fc14a25acf45eb1 860df69eacf attachments API
in Pike, which exposed the race on the Tempest side by
deleting the BDM in nova *after* marking the volume as
'available' in Cinder, and the os-volume_
checks for the existence of the BDM and if it exists, attempts
the detach (which then fails with the 400 from Cinder).
Change-Id: Id2d22cbb86d8d5 fa7f71202b27426 0c1367e8a0f
Closes-Bug: #1722577