Change in vdsm[ovirt-3.4]: blockVolume: prepare volumes for shrinkToOptimalSize

derez at redhat.com derez at redhat.com
Thu Jun 5 07:49:51 UTC 2014


Hello Federico Simoncelli, Dan Kenigsberg, Kevin Wolf,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/28382

to review the following change.

Change subject: blockVolume: prepare volumes for shrinkToOptimalSize
......................................................................

blockVolume: prepare volumes for shrinkToOptimalSize

The qemu-img check command needs the entire volume chain in order to
be able to open the image.
Up until now shrinkToOptimalSize worked only for base volumes, in the
other cases it was failing with:

 QImgError: ecode=1, stdout=[], stderr=[
   "Could not open '(image path)': No such file or directory"]

Change-Id: Ic9fceee28932da6895829c7e7efadb735c1ec060
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1097819
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/28009
Reviewed-by: Kevin Wolf <kwolf%redhat.com at gtempaccount.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/storage/blockVolume.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/28382/1

diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 81881a8..99b0de1 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -289,12 +289,12 @@
         """
         volParams = self.getVolumeParams()
         if volParams['volFormat'] == volume.COW_FORMAT:
-            self.prepare(justme=True)
+            self.prepare()
             try:
                 check = qemuImg.check(self.getVolumePath(),
                                       qemuImg.FORMAT.QCOW2)
             finally:
-                self.teardown(self.sdUUID, self.volUUID, justme=True)
+                self.teardown(self.sdUUID, self.volUUID)
             volActualSize = check['offset']
             volExtendSizeMB = int(config.get(
                                   "irs", "volume_utilization_chunk_mb"))


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9fceee28932da6895829c7e7efadb735c1ec060
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Kevin Wolf <kwolf%redhat.com at gtempaccount.com>


More information about the vdsm-patches mailing list