Change in vdsm[ovirt-3.6]: storage:
alitke at redhat.com
alitke at redhat.com
Wed Mar 23 19:32:35 UTC 2016
Adam Litke has uploaded a new change for review.
Change subject: storage:
......................................................................
storage:
In commit 736ab9 we began cleaning up volume links that were created in
/var/run/vdsm/images/... Unfortunately on block domains we are leaving
around a broken symlink in /rhev/data-center/... and this will cause
storage operations related to a disk of a VM that was previously running
to fail on this host. The solution is to also remove this broken
symlink during teardownImage.
Change-Id: I5fb871f3ccd785c555c72db34ab818c04d000534
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1319987
Signed-off-by: Adam Litke <alitke at redhat.com>
---
M vdsm/storage/blockSD.py
M vdsm/storage/fileSD.py
M vdsm/storage/hsm.py
3 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/55164/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 86a3a94..d10e625 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -1082,6 +1082,11 @@
raise
return dst
+ def unlinkBCImage(self, imgUUID):
+ img_path = self.getLinkBCImagePath(imgUUID)
+ if os.path.islink(img_path):
+ os.unlink(img_path)
+
def createImageLinks(self, srcImgPath, imgUUID, volUUIDs):
"""
qcow chain is build by reading each qcow header and reading the path
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index 7f9ae17..ada292d 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -496,6 +496,10 @@
# Nothing to do here other than returning the path
return self.getLinkBCImagePath(imgUUID)
+ def unlinkBCImage(self, imgUUID):
+ # Nothing to do since linkBCImage is a no-op
+ pass
+
def createImageLinks(self, srcImgPath, imgUUID):
"""
qcow chain is build by reading each qcow header and reading the path
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index f8eb3e5..02802c8 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3266,6 +3266,7 @@
dom = sdCache.produce(sdUUID)
dom.deactivateImage(imgUUID)
+ dom.unlinkBCImage(imgUUID)
@public
def getVolumesList(self, sdUUID, spUUID, imgUUID=volume.BLANK_UUID,
--
To view, visit https://gerrit.ovirt.org/55164
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fb871f3ccd785c555c72db34ab818c04d000534
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Adam Litke <alitke at redhat.com>
More information about the vdsm-patches
mailing list