]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Make begin_detaching fail if volume not "in-use"
authorNikola Dipanov <ndipanov@redhat.com>
Fri, 25 Apr 2014 11:38:31 +0000 (13:38 +0200)
committerNikola Dipanov <ndipanov@redhat.com>
Mon, 2 Jun 2014 15:37:23 +0000 (17:37 +0200)
commitd955c1da4490987233e252f94dffcfa106746c14
tree50a08cae7335da1bc09756cc75c7b6dcfd8befad
parentf40b4a36b41b88223e8a41fbccd1248ff4bba3ec
Make begin_detaching fail if volume not "in-use"

Like it's counterpart from Nova's volume-attach functionality standpoint
- reserve_volume, begin_detaching should fail if the volume is not in
  the correct state to be detached. This will prevent nova from
attempting to check and then detach, which is inherently racy.

Change-Id: Ie87eb0c9aea068affc94032ab2e53a91888d272a
Partial-bug: #1302774
cinder/tests/test_volume.py
cinder/volume/api.py