Skip to content

Instantly share code, notes, and snippets.

@mgagne
Last active December 22, 2015 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mgagne/6532358 to your computer and use it in GitHub Desktop.
Save mgagne/6532358 to your computer and use it in GitHub Desktop.
diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py
index f2be2d6..d1b98bf 100644
--- a/cinder/volume/manager.py
+++ b/cinder/volume/manager.py
@@ -183,10 +183,13 @@ class VolumeManager(manager.SchedulerDependentManager):
volume_ref = self.db.volume_update(context,
volume_ref['id'],
updates)
- self._copy_image_to_volume(context,
- volume_ref,
- image_service,
- image_id)
+ try:
+ self._copy_image_to_volume(context,
+ volume_ref,
+ image_service,
+ image_id)
+ except Exception as ex:
+ raise exception.ImageCopyFailure(reason=ex)
return model_update, cloned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment