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 <sgot...@redhat.com> --- 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/41/20941/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 b9d8ae3..3715f7e 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 @@ -88,7 +88,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/20941 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2b60d19f8832392d6f2df5cb05552560b7e10d1c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches