Ayal Baron has posted comments on this change.
Change subject: image: copying a template is always allowed
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File vdsm/storage/hsm.py
Line 1287: # an eliminate all race conditions
Line 1288: self._spmSchedule(spUUID, "deleteImage", lambda : True)
Line 1289:
Line 1290:
Line 1291: def validateImageCopy(self, srcDom, dstDom, imgUUID, safeToMove=False):
'safeToMove' doesn't mean anything and doesn't really belong here.
The copy should succeed and the delete should fail.
There should be no 'move' operation to begin with.
Line 1292: """
Line 1293: Determines if it is possible to copy (or move) the image.
Line 1294:
Line 1295: Copying or moving an image based on a template to a data domain is
Line 1317: "because the template %s is missing on the
"
Line 1318: "destination", imgUUID, dstDom.sdUUID,
tName)
Line 1319: raise se.ImageDoesNotExistInSD(imgUUID, dstDom.sdUUID)
Line 1320: elif (safeToMove and imgUUID == tImgs[0]
Line 1321: and not srcDom.isBackup()):
this is just a reply to my comment, not about the patch itself.
anyway, I'm ok with keeping the validation in light of concerns of regressions and
flows going awry.
Line 1322: raise se.MoveTemplateImageError(imgUUID)
Line 1323:
Line 1324: break
Line 1325:
--
To view, visit
http://gerrit.ovirt.org/8408
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9e07d569eec02ac4dcd386a7c576342f640ec242
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Shu Ming <shuming(a)linux.vnet.ibm.com>