storage/lvm: don't fail on removing already removed volumes

This may happen when removing not fully created VM.

QubesOS/qubes-issues#2256
This commit is contained in:
Marek Marczykowski-Górecki 2016-11-03 22:46:57 +01:00
parent 400e92b25a
commit 37dbf29bc1
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -160,6 +160,8 @@ class ThinPool(qubes.storage.Pool):
cmd = ['remove', volume._vid_snap]
qubes_lvm(cmd, self.log)
if not os.path.exists(volume.path):
return
cmd = ['remove', volume.vid]
qubes_lvm(cmd, self.log)
reset_cache()