Martin Peřina has uploaded a new change for review. Change subject: core: Rename finishSshSoftFencingExecution to resetStatusToConnecting in VdsManager ......................................................................
core: Rename finishSshSoftFencingExecution to resetStatusToConnecting in VdsManager Renames finishSshSoftFencingExecution to resetStatusToConnecting in VdsManager because the method called not only after successful SSH Soft Fencing but also after successful Kdump detection for VDS. Change-Id: If420606341813ada2ab1b4bf9bd49a7116187fe6 Bug-Url: https://bugzilla.redhat.com/1079821 Signed-off-by: Martin Perina <mper...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SshSoftFencingCommand.java M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java 2 files changed, 14 insertions(+), 7 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/40/28140/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SshSoftFencingCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SshSoftFencingCommand.java index a7531bb..7209c00 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SshSoftFencingCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SshSoftFencingCommand.java @@ -48,7 +48,9 @@ boolean result = executeSshSoftFencingCommand(getVds().getVdsGroupCompatibilityVersion().toString()); if (result) { // SSH Soft Fencing executed without errors, tell VdsManager about it - ResourceManager.getInstance().GetVdsManager(getVds().getId()).finishSshSoftFencingExecution(getVds()); + ResourceManager.getInstance().GetVdsManager(getVds().getId()).resetStatusToConnecting( + getVds(), + false); } getReturnValue().setSucceeded(result); } else { diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java index f7cd9e7..c082a27 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java @@ -775,16 +775,21 @@ } /** - * Resets counter to test VDS response and changes state to Connecting after successful SSH Soft Fencing execution. - * Changing state to Connecting tells VdsManager to monitor VDS and if VDS doesn't change state to Up, VdsManager - * will execute standard fencing after timeout interval. + * Resets counter to test VDS response and changes state to Connecting. Changing state to Connecting tells + * VdsManager to monitor VDS and if VDS doesn't change state to Up, VdsManager will execute standard fencing + * after timeout interval. * * @param vds - * VDS that SSH Soft Fencing has been executed on + * specified VDS + * @param resetLastUpdate + * if {@code true}, {@code lastUpdate} is set to current time (needed only after kdump detection) */ - public void finishSshSoftFencingExecution(VDS vds) { - // reset the unresponded counter to wait if VDSM restart helps + public void resetStatusToConnecting(VDS vds, boolean resetLastUpdate) { + // reset monitoring to wait if VDSM will respond again mUnrespondedAttempts.set(0); + if (resetLastUpdate) { + setLastUpdate(); + } // change VDS state to connecting setStatus(VDSStatus.Connecting, vds); updateDynamicData(vds.getDynamicData()); -- To view, visit http://gerrit.ovirt.org/28140 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If420606341813ada2ab1b4bf9bd49a7116187fe6 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches