Lee Yarwood has uploaded a new change for review.
Change subject: [WIP] BZ#748386 - Replace dd with qemu-img convert within _interImagesCopy. ......................................................................
[WIP] BZ#748386 - Replace dd with qemu-img convert within _interImagesCopy.
_interImagesCopy previously used dd to copy volumes thus fully allocating sparse file volumes. This change replaces dd with the new qemuImg.convert method.
Change-Id: I50db161a068a7269082baa5474d9057785730c4e Signed-off-by: Lee Yarwood lyarwood@redhat.com --- M vdsm/storage/image.py 1 file changed, 8 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/10088/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py index afb1abf..8f4867a 100644 --- a/vdsm/storage/image.py +++ b/vdsm/storage/image.py @@ -580,19 +580,14 @@ try: for srcVol in chains['srcChain']: # Do the actual copy - try: - dstVol = destDom.produceVolume(imgUUID=imgUUID, volUUID=srcVol.volUUID) - srcSize = srcVol.getVolumeSize(bs=1) - misc.ddWatchCopy(srcVol.getVolumePath(), dstVol.getVolumePath(), vars.task.aborting, size=srcSize) - except se.ActionStopped: - raise - except se.StorageException: - self.log.error("Unexpected error", exc_info=True) - raise - except Exception: - self.log.error("Copy image error: image=%s, src domain=%s, dst domain=%s", imgUUID, srcSdUUID, - destDom.sdUUID, exc_info=True) - raise se.CopyImageError() + dstVol = destDom.produceVolume(imgUUID=imgUUID, volUUID=srcVol.volUUID) + qemuImg.convert(srcVol, srcVol.getFormat(), dstVol, dstVol.getFormat()) + + except qemuImg.QImgError(e): + self.log.error("%s", str(e)) + raise + except Exception, e: + raise se.CopyImageError("Error copying src image=%s to dst image=%s: msg=%s" % (srcImgUUID, dstImgUUID, str(e))) finally: # teardown volumes self.__cleanupMove(srcLeafVol, dstLeafVol)
-- To view, visit http://gerrit.ovirt.org/10088 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I50db161a068a7269082baa5474d9057785730c4e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Lee Yarwood lyarwood@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] BZ#748386 - Replace dd with qemu-img convert within _interImagesCopy. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/359/ (1/2)
-- To view, visit http://gerrit.ovirt.org/10088 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I50db161a068a7269082baa5474d9057785730c4e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] BZ#748386 - Replace dd with qemu-img convert within _interImagesCopy. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/393/ (2/2)
-- To view, visit http://gerrit.ovirt.org/10088 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I50db161a068a7269082baa5474d9057785730c4e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] BZ#748386 - Replace dd with qemu-img convert within _interImagesCopy. ......................................................................
Patch Set 1: Fails; I would prefer that you didn't submit this
Build Failed
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/359/ : UNSTABLE
http://jenkins.ovirt.org/job/vdsm_unit_tests_manual_gerrit/393/ : FAILURE
-- To view, visit http://gerrit.ovirt.org/10088 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I50db161a068a7269082baa5474d9057785730c4e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Lee Yarwood has abandoned this change.
Change subject: [WIP] BZ#748386 - Replace dd with qemu-img convert within _interImagesCopy. ......................................................................
Patch Set 1: Abandoned
http://gerrit.ovirt.org/#/c/10979/
-- To view, visit http://gerrit.ovirt.org/10088 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: I50db161a068a7269082baa5474d9057785730c4e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Lee Yarwood lyarwood@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org