Change in vdsm[master]: sdm: Fix cleanup for raw block volumes
alitke at redhat.com
alitke at redhat.com
Mon Feb 9 21:38:24 UTC 2015
Adam Litke has uploaded a new change for review.
Change subject: sdm: Fix cleanup for raw block volumes
......................................................................
sdm: Fix cleanup for raw block volumes
Change-Id: I1bc16afef75a6b4b9fd350ed83a0f86a79bb9622
Signed-off-by: Adam Litke <alitke at redhat.com>
---
M vdsm/storage/sdm/blockstore.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/37632/1
diff --git a/vdsm/storage/sdm/blockstore.py b/vdsm/storage/sdm/blockstore.py
index f851051..ceb1a2b 100644
--- a/vdsm/storage/sdm/blockstore.py
+++ b/vdsm/storage/sdm/blockstore.py
@@ -77,6 +77,8 @@
qemuimg.create(volTmpPath, sizeBytes, volume.fmt2str(volFormat),
backingVolPath, volume.fmt2str(backingVolFormat))
+ else:
+ volTmpPath = None
metaId = (domain.sdUUID, mdSlot)
@@ -97,7 +99,8 @@
lvm.renameLV(domain.sdUUID, volTmpName, volUUID)
finally:
# TODO: refactor and improve (errors) this part
- os.unlink(volTmpPath)
+ if volTmpPath:
+ os.unlink(volTmpPath)
lvm.deactivateLVs(domain.sdUUID, (volTmpName, volUUID))
domain.releaseClusterLock()
--
To view, visit http://gerrit.ovirt.org/37632
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bc16afef75a6b4b9fd350ed83a0f86a79bb9622
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
More information about the vdsm-patches
mailing list