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 <ali...@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 <ali...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches