diff options
| author | Josh Durgin <josh.durgin@inktank.com> | 2012-08-13 15:13:06 -0700 |
|---|---|---|
| committer | Mark McLoughlin <markmc@redhat.com> | 2012-09-07 14:10:29 +0100 |
| commit | f192a166dcb15ba5939431edfe9bc62ed3372fe2 (patch) | |
| tree | 2204aa7481257fa6f997c1c8ec3984fd6d9338e9 /nova/openstack | |
| parent | 37cc45b8fdaa199b248a7ef5f683d514733b8387 (diff) | |
| download | nova-f192a166dcb15ba5939431edfe9bc62ed3372fe2.tar.gz nova-f192a166dcb15ba5939431edfe9bc62ed3372fe2.tar.xz nova-f192a166dcb15ba5939431edfe9bc62ed3372fe2.zip | |
rbd: implement create_volume_from_snapshot
In an upcoming release, rbd will support creating volumes from
snapshots ('cloning'). To clone a snapshot, it must first be
'protected', which means it cannot be deleted until it is unprotected.
A snapshot can only be unprotected if no clones depend on it. Thus,
translate a failure to unprotect into a SnapshotIsBusy exception.
Also check for remaining snapshots before deleting a volume,
and raise VolumeIsBusy if any exist. While we're here, tidy up
the shell arguments to be more readable.
This is backwards compatible since it does not use the new features
unless they are available in the installed version of rbd.
(cherry picked from cinder commit ff45e32)
Change-Id: If4105e7af7ba33f09a15103b53ad675aceb2ebb4
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'nova/openstack')
0 files changed, 0 insertions, 0 deletions
