Sergey Gotliv has uploaded a new change for review. Change subject: engine: Fix ClassCastException while attempting to detach direct LUN ......................................................................
engine: Fix ClassCastException while attempting to detach direct LUN Engine mistakenly trying to update VM snapshot id on direct LUN and fails with ClassCastException. This patch restores code checking the type of the disk before updating snapshot id. Change-Id: I2b60d19f8832392d6f2df5cb05552560b7e10d1c Bug-Url: https://bugzilla.redhat.com/1026920 Signed-off-by: Sergey Gotliv <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DetachDiskFromVmCommand.java 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/65/20965/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 71b60ec..05326dd 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 @@ -89,7 +89,7 @@ } getVmDeviceDao().remove(vmDevice.getId()); - if (!disk.isDiskSnapshot()) { + if (!disk.isDiskSnapshot() && DiskStorageType.IMAGE == disk.getDiskStorageType()) { // clears snapshot ID getImageDao().updateImageVmSnapshotId(((DiskImage) disk).getImageId(), null); } -- To view, visit http://gerrit.ovirt.org/20965 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b60d19f8832392d6f2df5cb05552560b7e10d1c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.3 Gerrit-Owner: Sergey Gotliv <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
