]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Don't leave snapshots on the floor
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 16 Jul 2014 14:49:37 +0000 (08:49 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Wed, 16 Jul 2014 14:49:37 +0000 (08:49 -0600)
commit38ed0523125efeaf8383b36d1db169b42e2f5eb6
tree53078d907f0340356601e5b066e8eb47fd6a3699
parent20707e22e3b104159c8d43f1ee265a79f5268a6f
Don't leave snapshots on the floor

The current cloning process in the LVM
driver uses a snapshot to do the data
copy in the background.  Trouble here
is that if the creation or activation
of the new volume fails, we don't
cleanup the snapshot we created.

Just move the create_volume and activate
calls down into the try block so the finally
clause can do the cleanup for us.

Change-Id: If0fbab9d9f39102cdc7d287527be22c4a2b35934
Closes-Bug: #1312718
cinder/volume/drivers/lvm.py