Yeela Kaplan has uploaded a new change for review.

Change subject: Rename lease files on v3 file SDs when renaming data and meta 
files
......................................................................

Rename lease files on v3 file SDs when renaming data and meta files

Change-Id: If3b3a2cf3499cc50b35b384ca72624d7f71c041a
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=886842
Signed-off-by: Yeela Kaplan <[email protected]>
---
M vdsm/storage/fileVolume.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/10208/1

diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index 2aab4d4..60fbcb0 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -490,6 +490,8 @@
         volPath = os.path.join(self.imagePath, newUUID)
         metaPath = self._getMetaVolumePath(volPath)
         prevMetaPath = self._getMetaVolumePath()
+        leasePath = self._getLeaseVolumePath(volPath)
+        prevLeasePath = self._getLeaseVolumePath()
 
         if recovery:
             name = "Rename volume rollback: " + volPath
@@ -505,6 +507,11 @@
                                                  "renameVolumeRollback",
                                                  [metaPath, prevMetaPath]))
         self.oop.os.rename(prevMetaPath, metaPath)
+        try:
+            self.oop.os.rename(prevLeasePath, leasePath)
+        except OSError, e:
+            if e.errno != os.errno.ENOENT:
+                raise
         self.volUUID = newUUID
         self.volumePath = volPath
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3b3a2cf3499cc50b35b384ca72624d7f71c041a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to