Maor Lipchuk has uploaded a new change for review. Change subject: core: Change disks status to illegal. ......................................................................
core: Change disks status to illegal. Event log is reporting changing disk status to illegal but disks stay in locked state Race between live snapshot and VM hibernate, cause results which might be undefined. The proposed fix is adding hibernateVM lock on the VM to avoid this behaviour. Change-Id: Ic4075c03b8d70d50b69222c73169ccc63e3ab66e Related-to: https://bugzilla.redhat.com/880687 Signed-off-by: Maor Lipchuk <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/48/11248/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java index 47f2df0..1e4bd80 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmCommand.java @@ -20,6 +20,7 @@ import org.ovirt.engine.core.common.action.VdcReturnValueBase; import org.ovirt.engine.core.common.businessentities.Disk; import org.ovirt.engine.core.common.businessentities.DiskImage; +import org.ovirt.engine.core.common.businessentities.ImageStatus; import org.ovirt.engine.core.common.businessentities.LunDisk; import org.ovirt.engine.core.common.businessentities.VM; import org.ovirt.engine.core.common.businessentities.VMStatus; @@ -284,6 +285,13 @@ // If the VM still has disk images related to it, change their status to Illegal. if (!diskImages.isEmpty()) { for (DiskImage diskImage : diskImages) { + if (diskImage.getimageStatus() != ImageStatus.ILLEGAL) { + log.errorFormat("Disk {0} which is part of VM {1} was not at ILLEGAL state.", + diskImage.getDiskAlias(), + getVm().getVmName()); + diskImage.setimageStatus(ImageStatus.ILLEGAL); + } + disksLeftInVm.add(diskImage.getDiskAlias()); } AddCustomValue("DisksNames", StringUtils.join(disksLeftInVm, ",")); -- To view, visit http://gerrit.ovirt.org/11248 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic4075c03b8d70d50b69222c73169ccc63e3ab66e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
