Arik Hadas has uploaded a new change for review. Change subject: core: rerun HA VMs on automatic fence using AutoStartVmsRunner ......................................................................
core: rerun HA VMs on automatic fence using AutoStartVmsRunner Before the engine sends fence request to VDSM, it tries to rerun the highly available VMs that ran on the host by invoking RunVmCommand directly. The problem is that we won't try to rerun the VM again if the RunVmCommand fails (and in case the host which is being fenced in the only one that was active in the cluster the command will fail for sure). The solution is to rerun the highly available VMs using AutoStartVmsRunner job in this flow as well. Change-Id: Ic259ff22c4b6f24b09eb973de6e31ebc51aa966b Bug-Url: https://bugzilla.redhat.com/1077706 Signed-off-by: Arik Hadas <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java 1 file changed, 4 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/36/26136/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java index cdd5696..aa8a895 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceVdsBaseCommand.java @@ -13,8 +13,6 @@ import org.ovirt.engine.core.bll.job.ExecutionHandler; import org.ovirt.engine.core.common.AuditLogType; import org.ovirt.engine.core.common.action.FenceVdsActionParameters; -import org.ovirt.engine.core.common.action.RunVmParams; -import org.ovirt.engine.core.common.action.VdcActionParametersBase; import org.ovirt.engine.core.common.action.VdcActionType; import org.ovirt.engine.core.common.businessentities.FenceActionType; import org.ovirt.engine.core.common.businessentities.FenceAgentOrder; @@ -467,8 +465,7 @@ } protected void restartVdsVms() { - java.util.ArrayList<VdcActionParametersBase> runVmParamsList = - new java.util.ArrayList<VdcActionParametersBase>(); + List<Guid> autoStartVmIdsToRerun = new ArrayList<>(); // restart all running vms of a failed vds. for (VM vm : mVmList) { destroyVmOnDestination(vm); @@ -489,11 +486,11 @@ // Handle highly available VMs if (vm.isAutoStartup()) { - runVmParamsList.add(new RunVmParams(vm.getId(), true)); + autoStartVmIdsToRerun.add(vm.getId()); } } - if (runVmParamsList.size() > 0) { - Backend.getInstance().runInternalMultipleActions(VdcActionType.RunVm, runVmParamsList); + if (!autoStartVmIdsToRerun.isEmpty()) { + AutoStartVmsRunner.getInstance().addVmsToRun(autoStartVmIdsToRerun); } setVm(null); setVmId(Guid.Empty); -- To view, visit http://gerrit.ovirt.org/26136 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic259ff22c4b6f24b09eb973de6e31ebc51aa966b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.4 Gerrit-Owner: Arik Hadas <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
