Eli Mesika has uploaded a new change for review. Change subject: core: Physically disconnecting blade from chass... ......................................................................
core: Physically disconnecting blade from chass... Physically disconnecting blade from chassis does not trigger HA VMs to restart This patch verifies that if a Stop PM operation fails and the Host on which the fencing was performed had running VMs, those VMs will be set to the UNKNOWN status just after the Stop PM operation failed. This way, the user can confirm manually that Host has been rebooted and start HA VMs on another host. Change-Id: I7d638d574bfe9195e56bdc5970544f97af15af6c Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1063432 Signed-off-by: Eli Mesika <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java 2 files changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/16/26216/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsCommand.java index e76ed39..9d40865 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RestartVdsCommand.java @@ -81,7 +81,9 @@ returnValueBase = executeVdsFenceAction(vdsId, sessionId, FenceActionType.Start, VdcActionType.StartVds); setSucceeded(returnValueBase.getSucceeded()); setFenceSucceeded(getSucceeded()); + setActionReturnValue(null); } else { + setActionReturnValue(VdcActionType.StopVds); setSucceeded(false); } if (!getSucceeded()) { diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java index 543ba1a..ee20ec1 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsNotRespondingTreatmentCommand.java @@ -74,6 +74,13 @@ } else { super.executeCommand(); } + // If Restart command was failed on the Stop stage, call handleError to set VMs to unknown + if (!getSucceeded() + && getActionReturnValue() != null + && getActionReturnValue().getClass().equals(VdcActionType.class) + && ((VdcActionType)getActionReturnValue()) == VdcActionType.StopVds) { + handleError(); + } } else { setCommandShouldBeLogged(false); log.infoFormat("Host {0}({1}) not fenced since it's status is ok, or it doesn't exist anymore.", -- To view, visit http://gerrit.ovirt.org/26216 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7d638d574bfe9195e56bdc5970544f97af15af6c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
