Federico Simoncelli has uploaded a new change for review.
Change subject: hsm: check volume existence in prepareImage
......................................................................
hsm: check volume existence in prepareImage
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1133617
Change-Id: Iceac3934b5eb3b7d3d68ea80ddd29cd9fe919c6c
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/31937/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 6a53ca7..ab48be8 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3227,6 +3227,10 @@
allVols = dom.getAllVolumes()
# Filter volumes related to this image
imgVolumes = sd.getVolsOfImage(allVols, imgUUID).keys()
+
+ if leafUUID not in imgVolumes:
+ raise se.VolumeDoesNotExist(leafUUID)
+
imgPath = dom.activateVolumes(imgUUID, imgVolumes)
if spUUID and spUUID != sd.BLANK_UUID:
runImgPath = dom.linkBCImage(imgPath, imgUUID)
--
To view, visit
http://gerrit.ovirt.org/31937
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iceac3934b5eb3b7d3d68ea80ddd29cd9fe919c6c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>