]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Check volume status in detach db api
authorAbhijeet Malawade <Abhijeet.Malawade@nttdata.com>
Thu, 22 Jan 2015 13:53:42 +0000 (05:53 -0800)
committerAbhijeet Malawade <Abhijeet.Malawade@nttdata.com>
Tue, 31 Mar 2015 10:36:30 +0000 (03:36 -0700)
commit909a4eb2fd5411f11e57c2589fc786611cdeda57
tree2a261fbeba04052e79a3bcf3f42e0df94e92611e
parent00ca77befeb38adc58b140fb3c445e9f91cfd30f
Check volume status in detach db api

If a volume is detached while uploading volume to image is in progress then
it sets volume status to available and then it is allowed to delete it
immediately while uploading is still running in background.

Set the status to available in the detach db api only when the volume
is not migrating and status is not uploading.

Closes-Bug: 1413887
Change-Id: I6df9c6918825fba7c8d7cd6521752b399dd61610
cinder/db/sqlalchemy/api.py
cinder/tests/test_volume.py