Maor Lipchuk has uploaded a new change for review.

Change subject: core: Validate detach of Cinder disk with snapshots.
......................................................................

core: Validate detach of Cinder disk with snapshots.

Validate detaching of cinder disk with snapshots.

Change-Id: Ideec729462d13d72b2a58ca34281d36cac427a55
Bug-Url: https://bugzilla.redhat.com/1185826
Signed-off-by: Maor Lipchuk <mlipc...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/59/42059/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
index 94bf7c4..8195233 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java
@@ -61,7 +61,8 @@
         }
 
         // Check if disk has no snapshots before detaching it.
-        if (retValue && DiskStorageType.IMAGE == disk.getDiskStorageType()) {
+        if (retValue && DiskStorageType.IMAGE == disk.getDiskStorageType() ||
+                retValue && DiskStorageType.CINDER == 
disk.getDiskStorageType()) {
             // A "regular" disk cannot be detached if it's part of the vm 
snapshots
             // when a disk snapshot is being detached, it will always be part 
of snapshots - but of it's "original" vm,
             // therefore for attached disk snapshot it shouldn't be checked 
whether it has snapshots or not.


-- 
To view, visit https://gerrit.ovirt.org/42059
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ideec729462d13d72b2a58ca34281d36cac427a55
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to