Eduardo has uploaded a new change for review.
Change subject: BZ#836161 - Clean up. ......................................................................
BZ#836161 - Clean up.
Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Signed-off-by: Eduardo ewarszaw@redhat.com --- M vdsm/storage/sp.py 1 file changed, 0 insertions(+), 71 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/8507/1
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py index 78fbe66..0ade40d 100644 --- a/vdsm/storage/sp.py +++ b/vdsm/storage/sp.py @@ -1766,73 +1766,6 @@ image.Image(repoPath).multiMove(srcDomUUID, dstDomUUID, imgDict, vmUUID, force)
- def deleteImage(self, sdUUID, imgUUID, postZero, force): - """ - Deletes an Image folder with all its volumes. - - This function assumes that imgUUID is locked. - In addition to removing image, this function also does the following: - If removing a template from a backup SD which has dependent images: - - creates a fake template. - If removing the last image which depends on a fake template: - - removes the fake template as well - :param sdUUID: The UUID of the storage domain that contains the images. - :type sdUUID: UUID - :param imgUUID: The UUID of the image you want to delete. - :type imgUUID: UUID - :param postZero: bool - :param force: Should the operation be forced. - :type force: bool - """ - # TODO: This function works on domains. No relation with pools. - # Therefore move this to the relevant *sd module - repoPath = os.path.join(self.storage_repository, self.spUUID) - img = image.Image(repoPath) - dom = sdCache.produce(sdUUID) - allVols = dom.getAllVolumes() - # Filter volumes related to this image - imgsByVol = sd.getVolsOfImage(allVols, imgUUID) - if all(len(v.imgs) == 1 for k, v in imgsByVol.iteritems()): - # This is a self contained regular image, i.e. it's either an image - # which is not based on a template or a template which has no - # derived images, e.g. not derived from a template - img.delete(sdUUID=sdUUID, imgUUID=imgUUID, postZero=postZero, force=force) - else: - # This is either a template with derived images or a derived image - # so needs further scrutiny - ts = tuple((volName, vol.imgs) for volName, vol in - imgsByVol.iteritems() if len(vol.imgs) > 1) - if len(ts) != 1: - raise se.ImageValidationError("Image points to multiple" - "templates %s in %s from %s" % \ - (ts, imgsByVol, allVols)) - # TODO: Lock the template, reload allVols. - # template = ts[0] = [(tName, tImgs)] - tName, tImgs = ts[0] - # getAllVolumes makes the template self img the 1st one in tImgs - templateImage = tImgs[0] - numOfDependentImgs = len(tImgs) - 1 - if templateImage != imgUUID: - # Removing an image based on a template - img.delete(sdUUID=sdUUID, imgUUID=imgUUID, postZero=postZero, force=force) - if numOfDependentImgs == 1 and dom.produceVolume(templateImage, tName).isFake(): - # Remove the fake template since last consumer was removed - img.delete(sdUUID=sdUUID, imgUUID=templateImage, postZero=False, force=True) - - # Removing a template with dependencies - elif force: - img.delete(sdUUID=sdUUID, imgUUID=templateImage, postZero=postZero, - force=force) - elif not dom.isBackup(): - raise se.ImagesActionError("Can't remove template with children %s", - allVols) - else: - # Removing a template with dependencies in backup domain - # A fake template will be created - img.delete(sdUUID=sdUUID, imgUUID=imgUUID, postZero=postZero, force=True) - tParams = dom.produceVolume(imgUUID, tName).getVolumeParams() - img.createFakeTemplate(sdUUID=sdUUID, volParams=tParams) - def mergeSnapshots(self, sdUUID, vmUUID, imgUUID, ancestor, successor, postZero): """ Merges the source volume to the destination volume. @@ -2012,10 +1945,6 @@ def preDeleteRename(self, sdUUID, imgUUID): repoPath = os.path.join(self.storage_repository, self.spUUID) return image.Image(repoPath).preDeleteRename(sdUUID, imgUUID) - - def validateDelete(self, sdUUID, imgUUID): - repoPath = os.path.join(self.storage_repository, self.spUUID) - image.Image(repoPath).validateDelete(sdUUID, imgUUID)
def validateVolumeChain(self, sdUUID, imgUUID): repoPath = os.path.join(self.storage_repository, self.spUUID)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com
Ayal Baron has posted comments on this change.
Change subject: BZ#836161 - Clean up. ......................................................................
Patch Set 1: (1 inline comment)
why is this separate from the previous patch?
.................................................... Commit Message Line 3: AuthorDate: 2012-10-04 13:15:17 +0200 Line 4: Commit: Eduardo Warszawski ewarszaw@redhat.com Line 5: CommitDate: 2012-10-11 19:29:11 +0200 Line 6: Line 7: BZ#836161 - Clean up. clean up of what? why? it solves bug 836161 Line 8: Line 9: Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com
Ayal Baron has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 2: Looks good to me, approved
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com
Haim Ateya has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 5: Verified
Patch Set 5: Verified verified executing the following scenarios: delete disk w\ post zero delete disk w\o post zero delete disk w\ post zero and 1 snapshot delete disk w\o post zero and 1 snapshot delete disk w\ post zero and 3 snapshot delete disk w\o post zero and 3 snapshot delete 3 disk w\ post zero and 1 snapshot delete 3 disk w\o post zero and 1 snapshot Tested block storage domains
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com
Haim Ateya has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 8: Verified
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com
Shu Ming has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 8: I would prefer that you didn't submit this
(1 inline comment)
.................................................... File vdsm/storage/sp.py Line 1795 Line 1796 Line 1797 Line 1798 Line 1799 Image.delete(), Image._delete(), Image.validateDelete(), Image.preDeleteRename() are also obsolete.
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Shu Ming has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 10: I would prefer that you didn't submit this
Unfortunately, there are two other places calling the obsolete Image.delete() function. See Image.copy() and Image.move(). Can we replace them with the new sd.deleteImage()?
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 10 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Shu Ming has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 11: Looks good to me, but someone else must approve
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 11 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Ayal Baron has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 12: (1 inline comment)
.................................................... File vdsm/storage/image.py Line 480: # At this point we successfully finished the 'copy' part of the operation Line 481: # and we can clear all recoveries. Line 482: vars.task.clearRecoveries() Line 483: # If it's 'move' operation, we should delete src image after copying Line 484: if op == MOVE_OP: we should not fail if produce/delete fail here. Line 485: dom = sdCache.produce(srcSdUUID) Line 486: _deleteImage(dom, imgUUID, postZero) Line 487: Line 488: self.log.info("%s task on image %s was successfully finished", OP_TYPES[op], imgUUID)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Ayal Baron has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 12: I would prefer that you didn't submit this
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
Eduardo has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 12: (1 inline comment)
.................................................... File vdsm/storage/image.py Line 480: # At this point we successfully finished the 'copy' part of the operation Line 481: # and we can clear all recoveries. Line 482: vars.task.clearRecoveries() Line 483: # If it's 'move' operation, we should delete src image after copying Line 484: if op == MOVE_OP: The issue, as we know is move = copy + delete. IMHO reporting move success if the delete part has failed will be misleading. The engine should differentiate which move part has failed, sample the storage state and act upon. Better will engine issuing two different commands: copy and afterwards delete. Another option is VDSM marking the src that failed to delete for GC but it is a dangerous path. Line 485: dom = sdCache.produce(srcSdUUID) Line 486: _deleteImage(dom, imgUUID, postZero) Line 487: Line 488: self.log.info("%s task on image %s was successfully finished", OP_TYPES[op], imgUUID)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 12 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13:
Build Started http://alterway01.ovirt.org/job/vdsm_unit_tests_gerrit/1452/ (1/2)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1435/ (1/3)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13:
Build Started http://alterway01.ovirt.org/job/vdsm_pep8_gerrit/1415/ (2/2)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/582/ (2/3)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13: Fails
Build Failed
http://alterway01.ovirt.org/job/vdsm_pep8_gerrit/1415/ : SUCCESS
http://alterway01.ovirt.org/job/vdsm_unit_tests_gerrit/1452/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13: No score
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1474/ (3/3)
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 13: Fails
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1435/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1474/ : ABORTED
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/582/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/8507 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Gerrit-PatchSet: 13 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Daniel Paikov paikov@gmail.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Gadi Ickowicz gickowic@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2755/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1943/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2829/ : SUCCESS
Sergey Gotliv has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14: Looks good to me, but someone else must approve
Ayal Baron has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14: Looks good to me, but someone else must approve
(1 inline comment)
.................................................... File vdsm/storage/image.py Line 521: # operation and we can clear all recoveries. Line 522: vars.task.clearRecoveries() Line 523: # If it's 'move' operation, we should delete src image after copying Line 524: if op == MOVE_OP: Line 525: # TODO: Should raise here. why? you're inside 'move' function. The todo is to deprecate the function and only have 'copy' and 'delete' Line 526: try: Line 527: dom = sdCache.produce(srcSdUUID) Line 528: _deleteImage(dom, imgUUID, postZero) Line 529: except se.StorageException:
Eduardo has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14: (1 inline comment)
.................................................... File vdsm/storage/image.py Line 521: # operation and we can clear all recoveries. Line 522: vars.task.clearRecoveries() Line 523: # If it's 'move' operation, we should delete src image after copying Line 524: if op == MOVE_OP: Line 525: # TODO: Should raise here. You are right. But this is an ancient patch.
The MOVE_OP should be removed.
Anyway this copyImage function should be in the SD for legacy images. Line 526: try: Line 527: dom = sdCache.produce(srcSdUUID) Line 528: _deleteImage(dom, imgUUID, postZero) Line 529: except se.StorageException:
Allon Mureinik has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14: Looks good to me, but someone else must approve
Allon Mureinik has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14: (1 inline comment)
.................................................... Commit Message Line 8: Line 9: This is a separate patch for improved readability. Line 10: Line 11: Related to BZ#910013, BZ#905938, BZ#875708, BZ#864073 Line 12: Please add: Bug-Url: http://bugzilla.redhat.com/836161
As per the project's convention Line 13: Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de
Dan Kenigsberg has submitted this change and it was merged.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
BZ#836161 - Remove code obsoleted by deleteImage() rewrite.
This is a separate patch for improved readability.
Related to BZ#910013, BZ#905938, BZ#875708, BZ#864073
Change-Id: Icf01de7dc8bf0a903ebf94d9e33ffad9a195b7de Signed-off-by: Eduardo ewarszaw@redhat.com Reviewed-on: http://gerrit.ovirt.org/8507 Reviewed-by: Sergey Gotliv sgotliv@redhat.com Reviewed-by: Ayal Baron abaron@redhat.com Reviewed-by: Allon Mureinik amureini@redhat.com Tested-by: Elad Ben Aharon eladba1990@gmail.com Reviewed-by: Dan Kenigsberg danken@redhat.com --- M vdsm/storage/blockVolume.py M vdsm/storage/fileVolume.py M vdsm/storage/image.py 3 files changed, 2 insertions(+), 220 deletions(-)
Approvals: Ayal Baron: Looks good to me, but someone else must approve Elad Ben Aharon: Verified Sergey Gotliv: Looks good to me, but someone else must approve Allon Mureinik: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#836161 - Remove code obsoleted by deleteImage() rewrite. ......................................................................
Patch Set 14: Looks good to me, approved
vdsm-patches@lists.fedorahosted.org