Federico Simoncelli has uploaded a new change for review.
Change subject: vm: snapshot transient disk check should be per disk
......................................................................
vm: snapshot transient disk check should be per disk
Live snapshot is allowed if all the disks in the snapshot request are
not transient.
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1065886
Change-Id: I3775e2218186e56e99740c6f91c8c98484529892
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Reviewed-on:
http://gerrit.ovirt.org/24867
Reviewed-by: Daniel Erez <derez(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
(cherry picked from commit ed8b6b28122ec4c8917f85ab19695691d2866e0b)
---
M vdsm/vm.py
1 file changed, 5 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/25007/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 8b74187..5d38a55 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -3889,9 +3889,6 @@
if self.isMigrating():
return errCode['migInProgress']
- if self.hasTransientDisks():
- return errCode['transientErr']
-
for drive in snapDrives:
baseDrv, tgetDrv = _normSnapDriveParams(drive)
@@ -3915,8 +3912,13 @@
return errCode['snapshotErr']
if vmDrive.hasVolumeLeases:
+ self.log.error('disk %s has volume leases', vmDrive.name)
return errCode['noimpl']
+ if vmDrive.transientDisk:
+ self.log.error('disk %s is a transient disk', vmDrive.name)
+ return errCode['transientErr']
+
vmDevName = vmDrive.name
newDrives[vmDevName] = tgetDrv.copy()
--
To view, visit
http://gerrit.ovirt.org/25007
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3775e2218186e56e99740c6f91c8c98484529892
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>