]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Be safe with getting attachment
authorWalter A. Boring IV <walter.boring@hp.com>
Mon, 23 Mar 2015 23:39:37 +0000 (16:39 -0700)
committerWalter A. Boring IV <walter.boring@hp.com>
Wed, 25 Mar 2015 17:29:52 +0000 (10:29 -0700)
commitbc7a284bd2fd27d0f29a8facd5a67abc90667f26
treea4acd2a608d6cd9a1e17dffbff29bfa166f14c9a
parent5d3a14da424a3b506447c116b4149368bbca5695
Be safe with getting attachment

The volume manager wasn't being safe with trying to pull an
attachment out of the attachments list.  It's possible someone
is calling the manager to detach a volume that has no attachments.

This patch raises an InvalidVolume exception if we detect that
there are no attachments left to detach.

Change-Id: I684ed870d13a4efc6f64b0144c987e355428bc54
Closes-Bug: #1435574
cinder/tests/test_volume.py
cinder/volume/manager.py