Eli Mesika has uploaded a new change for review. Change subject: core: fixing fencing flow for blocked proxy ......................................................................
core: fixing fencing flow for blocked proxy This patch fixes the following scenario : DC1 with H1 (with PM) and H2 on cluster C1 another host H3 on DC1 cluster C2 When we are blocking the communication with iptables from H2 to H1 PM card and use the default proxy preferences (cluster, dc) a Restart operation will always fail. The fix relies on the return code from the script that was executed by VDSM rather than the proceedProxyReturnValue call that throws an exception and also set the execution result according to that code. In addition a missing initialization of the 'count' variable in the 'for' loop has been added. This BZ depends also in a VDSM fix that makes stop/start operation sync instead of fire-and-forget. Change-Id: I70d35967554c88c943c4653a26642e6e21cc54d2 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1129381 Signed-off-by: Eli Mesika <emes...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/92/32692/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java index 5e27cc3..9497a29 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FenceExecutor.java @@ -70,7 +70,7 @@ public boolean findProxyHost() { PMProxyOptions proxyOption=null; final Guid NO_VDS = Guid.Empty; - int count = 0; + int count; // make sure that loop is executed at least once , no matter what is the // value in config int retries = Math.max(Config.<Integer> getValue(ConfigValues.FindFenceProxyRetries), 1); @@ -85,6 +85,7 @@ : _vds.getPmProxyPreferences(); String[] pmProxyOptions = pmProxyPreferences.split(","); for (String pmProxyOption : pmProxyOptions) { + count = 0; if (pmProxyOption.equalsIgnoreCase(PMProxyOptions.CLUSTER.name())) { proxyOption = PMProxyOptions.CLUSTER; } diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java index 543986f..8a1d28c 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/FenceVdsVDSCommand.java @@ -91,7 +91,6 @@ convertFencingPolicy() ); - proceedProxyReturnValue(); getVDSReturnValue().setSucceeded(false); if (getParameters().getAction() == FenceActionType.Status && _result.power != null) { String stat = _result.power.toLowerCase(); @@ -112,7 +111,7 @@ _result.mStatus.mMessage != null ? _result.mStatus.mMessage : "" ); setReturnValue(fenceStatusReturnValue); - getVDSReturnValue().setSucceeded(true); + getVDSReturnValue().setSucceeded(_result.mStatus.mCode == 0); } } else { handleSkippedOperation(); -- To view, visit http://gerrit.ovirt.org/32692 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I70d35967554c88c943c4653a26642e6e21cc54d2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches