Change in vdsm[master]: clientIF: Check image alignment using virt-alignment-scan

ykaplan at redhat.com ykaplan at redhat.com
Thu Feb 28 11:01:56 UTC 2013


Yeela Kaplan has posted comments on this change.

Change subject: clientIF: Check image alignment using virt-alignment-scan
......................................................................


Patch Set 1: (5 inline comments)

....................................................
File vdsm/alignmentScan.py
Line 48:     rc, out, err = runScanArgs('--add', image_path)
Line 49:     if rc == 1:
Line 50:         raise VirtAlignError("An error scanning the disk image "
Line 51:                              "or guest:\n%s" % err)
Line 52:     elif rc not in [0, 2, 3]:
Done
Line 53:         raise VirtAlignError("Unexpected return code from "
Line 54:                              "virt-alignment-scan: %d" % rc)
Line 55:     outList = []
Line 56:     for line in out:


Line 53:         raise VirtAlignError("Unexpected return code from "
Line 54:                              "virt-alignment-scan: %d" % rc)
Line 55:     outList = []
Line 56:     for line in out:
Line 57:         outList.append(ScanOutput(*line.split(None, 3)))
I think we should maintain compatibility to the original output of virt-alignment-scan tool, and the output is straight-forward from the ScanOutput namedtuple structure.


....................................................
File vdsm/storage/hsm.py
Line 1706:             spUUID, "mergeSnapshots", pool.mergeSnapshots, sdUUID, vmUUID,
Line 1707:             imgUUID, ancestor, successor, misc.parseBool(postZero))
Line 1708: 
Line 1709:     @public
Line 1710:     def getImageAlignment(self, sdUUID, spUUID, imgUUID):
Done
Line 1711:         """
Line 1712:         Returns the alignment of the image
Line 1713: 
Line 1714:         :param spUUID: The UUID of the storage pool that contains the image.


Line 1715:         :type spUUID: UUID
Line 1716:         :param sdUUID: The UUID of the storage domain that contains the image.
Line 1717:         :type sdUUID: UUID
Line 1718:         :param imgUUID: The UUID of the image.
Line 1719:         :type imgUUID: UUID
Done
Line 1720:         """
Line 1721:         img = self.prepareImage(sdUUID, spUUID, imgUUID)
Line 1722:         try:
Line 1723:             out = alignmentScan.scanImage(img['path'])


Line 1724:         finally:
Line 1725:             self.teardownImage(sdUUID, spUUID, imgUUID)
Line 1726: 
Line 1727:         aligning = {}
Line 1728:         for line in out:
Done
Line 1729:             aligning[out[line][0]] = (out[line][3] == "ok")
Line 1730:         return aligning
Line 1731: 
Line 1732:     @public


--
To view, visit http://gerrit.ovirt.org/12003
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia925f5f138948acca623f6379b7b811474a43ffe
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list