]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Get updated volume status in begin_detaching
authorVipin Balachandran <vbala@vmware.com>
Tue, 16 Jun 2015 12:15:18 +0000 (17:45 +0530)
committerVipin Balachandran <vbala@vmware.com>
Fri, 19 Jun 2015 09:36:06 +0000 (15:06 +0530)
commit8fdfac7177b2fd03d86c1bbe0513026492e46341
tree7c91573320bce2d8f32325098f04a0cc6547841d
parentf51ba4520879414a5ad6169be2723dc20b36b4bb
Get updated volume status in begin_detaching

Heat stack deletion followed by an unsuccessful heat stack delete
attempt resulted in calling begin_detaching on a volume which was
already in detaching state. It was observed that the API returned
success instead of failing the operation. There is a check which
verifies the volume status, but it is not using the updated volume
status. This patch fixes the problem by getting updated volume
status from DB. But this fix  won't eliminate the possibility of
above mentioned inconsistent behavior if multiple begin_detaching
happens concurrently.

Closes-Bug: #1466060
Change-Id: I2a4cacef193e6cfa68026d97292370a895b291a9
cinder/tests/unit/test_volume.py
cinder/volume/api.py