Eli Mesika has uploaded a new change for review. Change subject: core:Do not force fencing proxy to be ...(#876235) ......................................................................
core:Do not force fencing proxy to be ...(#876235) Do not force fencing proxy to be in UP status Currently when a host is non-responsive and has Power Management configured, we are looking for a proxy host in the same cluster to carry out the fencing commands that will actually reboot the problematic host. The algorithm of finding such a proxy was up to now to find the first host that in in UP status in the host DC. This patch modified the algorithm of proxy finding to 1) Look for a Host in the problematic Host DC which is UP 2) If 1) fails, try to use any other Host in the same DC as a proxy this is done because there is no connection between the Host status and its ability to carry out proxy commands (which can be done if Host has network connectivity) although we can assume that a Host that is in UP status is connected to the network and its chance to succeed in carrying out the fencing operations is the best. Change-Id: I437e9b2bb0300f8d71cc8f0c50aaff1b253a63bb Signed-off-by: Eli Mesika <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FencingExecutor.java 1 file changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/9251/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FencingExecutor.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FencingExecutor.java index de54452..fec21df 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FencingExecutor.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/FencingExecutor.java @@ -43,14 +43,23 @@ // check if this is a new host, no need to retry , only status is // available on new host. if (_vds.getId().equals(NO_VDS)) { + // try first to find a Host in UP status vdsToRun = LinqUtils.firstOrNull(DbFacade.getInstance().getVdsDao().getAll(), new Predicate<VDS>() { @Override public boolean eval(VDS vds) { return vds.getstatus() == VDSStatus.Up && vds.getstorage_pool_id().equals(_vds.getstorage_pool_id()); - } }); + // trying other Hosts that are not in UP since they can be a proxy for fencing operations + if (vdsToRun == null) { + vdsToRun = LinqUtils.firstOrNull(DbFacade.getInstance().getVdsDao().getAll(), new Predicate<VDS>() { + @Override + public boolean eval(VDS vds) { + return vds.getstorage_pool_id().equals(_vds.getstorage_pool_id()); + } + }); + } if (vdsToRun != null) { _vdsToRunId = vdsToRun.getId(); _vdsToRunName = vdsToRun.getvds_name(); @@ -68,6 +77,14 @@ && vds.getstatus() == VDSStatus.Up; } }); + if (vdsToRun == null) { + vdsToRun = LinqUtils.firstOrNull(DbFacade.getInstance().getVdsDao().getAll(), new Predicate<VDS>() { + @Override + public boolean eval(VDS vds) { + return !vds.getId().equals(_vds.getId()) && vds.getstorage_pool_id().equals(_vds.getstorage_pool_id()); + } + }); + } if (vdsToRun != null) { _vdsToRunId = vdsToRun.getId(); _vdsToRunName = vdsToRun.getvds_name(); -- To view, visit http://gerrit.ovirt.org/9251 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I437e9b2bb0300f8d71cc8f0c50aaff1b253a63bb 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
