[NEW PATCH] BZ#717952 - Fix race in moveImage with overwrite of VM with several disks on NFS domains (via gerrit-bot)

Igor Lvovsky ilvovsky at redhat.com
Sun Jul 10 15:32:58 UTC 2011


New patch submitted by Igor Lvovsky (ilvovsky at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/646

commit 06bc73dd65b05a9d76938e36c93e7f12bcae0b4a
Author: Igor Lvovsky <ilvovsky at redhat.com>
Date:   Tue Jul 5 16:00:21 2011 +0300

    BZ#717952 - Fix race in moveImage with overwrite of VM with several disks on NFS domains
    
    Change-Id: I367e83a700e84be0e4cb0ca5b7a02416cb54ac25

diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index ccad167..c1e3ec9 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -378,7 +378,11 @@ class Image:
         # Avoid relink templates for SAN domains
         if destDom.getStorageType() in [ sd.NFS_DOMAIN ]:
             vol = destDom.produceVolume(imgUUID=imgUUID, volUUID=volUUID)
-            chList = vol.getAllChildrenList(self.repoPath, sdUUID, imgUUID, volUUID)
+            # Relink templates only
+            if not vol.isShared():
+                self.log.debug("Doesn't relink regular volume %s of image %s", volUUID, imgUUID)
+                return
+            chList = vol.getAllChildrenList(self.repoPath, destDom.sdUUID, imgUUID, volUUID)
             for ch in chList:
                 # Remove hardlink of this template
                 v = destDom.produceVolume(imgUUID=ch['imgUUID'], volUUID=volUUID)




More information about the vdsm-patches mailing list