Sahina Bose has uploaded a new change for review. Change subject: engine: Host activate -check gluster availability ......................................................................
engine: Host activate -check gluster availability If cluster supports gluster service, need to check if gluster is running, while activating host. If gluster command fails on server, the host state should not be changed to UP on activate. Change-Id: If673e32ed6480187ddcf6f9ecf8f0007e203b98d Bug-Url: https://bugzilla.redhat.com/975382 Bug-Url: https://bugzilla.redhat.com/968178 Signed-off-by: Sahina Bose <[email protected]> --- M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/GlusterMonitoringStrategy.java 1 file changed, 18 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/81/21081/1 diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/GlusterMonitoringStrategy.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/GlusterMonitoringStrategy.java index da3578e..be6db56 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/GlusterMonitoringStrategy.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/GlusterMonitoringStrategy.java @@ -1,6 +1,12 @@ package org.ovirt.engine.core.vdsbroker; +import org.ovirt.engine.core.common.businessentities.NonOperationalReason; import org.ovirt.engine.core.common.businessentities.VDS; +import org.ovirt.engine.core.common.businessentities.VDSStatus; +import org.ovirt.engine.core.common.vdscommands.VDSCommandType; +import org.ovirt.engine.core.common.vdscommands.VDSReturnValue; +import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase; +import org.ovirt.engine.core.compat.Guid; /** * This class defines gluster strategy entry points, which are needed in host monitoring phase @@ -19,6 +25,18 @@ @Override public void processSoftwareCapabilities(VDS vds) { + // check if gluster is running + VDSReturnValue returnValue = ResourceManager.getInstance().runVdsCommand(VDSCommandType.GlusterServersList, + new VdsIdVDSCommandParametersBase(vds.getId())); + if (!returnValue.getSucceeded()) { + vds.setStatus(VDSStatus.NonOperational); + vds.setNonOperationalReason(NonOperationalReason.GLUSTER_COMMAND_FAILED); + vdsNonOperational(vds, NonOperationalReason.GLUSTER_COMMAND_FAILED); + } + } + + private void vdsNonOperational(VDS vds, NonOperationalReason reason) { + ResourceManager.getInstance().getEventListener().vdsNonOperational(vds.getId(), reason, true, true, Guid.Empty, null); } @Override -- To view, visit http://gerrit.ovirt.org/21081 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If673e32ed6480187ddcf6f9ecf8f0007e203b98d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.3 Gerrit-Owner: Sahina Bose <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
