Change in vdsm[master]: upgrade: fix v3ResetMetaVolSize argument

fsimonce at redhat.com fsimonce at redhat.com
Wed Oct 30 16:27:03 UTC 2013


Federico Simoncelli has uploaded a new change for review.

Change subject: upgrade: fix v3ResetMetaVolSize argument
......................................................................

upgrade: fix v3ResetMetaVolSize argument

In commit c072945 (one shot prepare) the v3ResetMetaVolSize argument
was changed from volume object to volume uuid (string) triggering
attribute errors during the execution (e.g. getMetaParam, etc.).
This patch fixes the issue reintroducing the volume objects and the
relevant exception handling.

Change-Id: Iddffa996652300e5a5daa19bef5bd7873f39bb15
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/imageRepository/formatConverter.py
1 file changed, 15 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/20721/1

diff --git a/vdsm/storage/imageRepository/formatConverter.py b/vdsm/storage/imageRepository/formatConverter.py
index a95bfe6..441f484 100644
--- a/vdsm/storage/imageRepository/formatConverter.py
+++ b/vdsm/storage/imageRepository/formatConverter.py
@@ -274,13 +274,25 @@
                     log.error("Image %s can't be activated.",
                               imgUUID, exc_info=True)
 
-                for vol in imgVolumes:
+                for volUUID in imgVolumes:
                     try:
-                        v3ResetMetaVolSize(vol)  # BZ#811880
+                        v3ResetMetaVolSize(  # BZ#811880
+                            domain.produceVolume(imgUUID, volUUID))
                     except qemuImg.QImgError:
                         log.error("It is not possible to read the volume %s "
                                   "using qemu-img, the content looks damaged",
-                                  vol.volUUID, exc_info=True)
+                                  volUUID, exc_info=True)
+
+            except se.VolumeDoesNotExist:
+                log.error("It is not possible to prepare the image %s, the "
+                          "volume chain looks damaged", imgUUID,
+                          exc_info=True)
+
+            except se.MetaDataKeyNotFoundError:
+                log.error("It is not possible to prepare the image %s, the "
+                          "volume metadata looks damaged", imgUUID,
+                          exc_info=True)
+
             finally:
                 try:
                     domain.deactivateImage(imgUUID)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddffa996652300e5a5daa19bef5bd7873f39bb15
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce at redhat.com>


More information about the vdsm-patches mailing list