use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.
the class ConfigProperties method passwords.
public static void passwords() {
ClusterInfo clusterInfo = Common.getClusterInfoWithRoleCheck();
render(clusterInfo);
}
use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.
the class Maintenance method maintenance.
public static void maintenance(String targetUrl) {
ClusterInfo clusterInfo = null;
try {
clusterInfo = getClusterState();
} catch (Exception e) {
// This is not necessarily a problem. The cluster could already be down
Common.handleExpiredToken(e);
Logger.info(e, "Failed to get cluster state");
clusterInfo = defaultClusterInfo(clusterInfo);
}
render(targetUrl, clusterInfo);
}
use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.
the class Maintenance method getClusterStateFromCoordinator.
private static ClusterInfo getClusterStateFromCoordinator() {
if (StorageOsPlugin.isEnabled()) {
CoordinatorClient coordinatorClient = StorageOsPlugin.getInstance().getCoordinatorClient();
ClusterInfo.ClusterState clusterState = coordinatorClient.getControlNodesState();
if (clusterState != null) {
ClusterInfo clusterInfo = new ClusterInfo();
clusterInfo.setCurrentState(clusterState.toString());
return clusterInfo;
}
}
return null;
}
use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.
the class SystemHealth method nodeRecoveryVapp.
public static void nodeRecoveryVapp() {
ViPRSystemClient client = BourneUtil.getSysClient();
RecoveryStatus recoveryStatus = client.control().getRecoveryStatus();
if (recoveryStatus.getStartTime() != null) {
DateTime startTime = new DateTime(recoveryStatus.getStartTime().getTime());
renderArgs.put("startTime", startTime);
}
if (recoveryStatus.getEndTime() != null) {
DateTime endTime = new DateTime(recoveryStatus.getEndTime().getTime());
renderArgs.put("endTime", endTime);
}
RecoveryPrecheckStatus recoveryPrecheckStatus = client.control().getRecoveryPrecheckStatus();
String precheckMsg = "";
switch(recoveryPrecheckStatus.getStatus()) {
case RECOVERY_NEEDED:
precheckMsg = Messages.get("nodeRecovery.precheck.success", recoveryPrecheckStatus.getRecoverables().toString());
break;
case ALL_GOOD:
precheckMsg = Messages.get("nodeRecovery.precheck.fail.allgood");
break;
case VAPP_IN_DR_OR_GEO:
precheckMsg = Messages.get("nodeRecovery.precheck.fail.drorgeo");
break;
case NODE_UNREACHABLE:
precheckMsg = Messages.get("nodeRecovery.precheck.fail.unreachable");
break;
case CORRUPTED_NODE_COUNT_MORE_THAN_QUORUM:
precheckMsg = Messages.get("nodeRecovery.precheck.fail.quorum");
break;
case CORRUPTED_NODE_FOR_OTHER_REASON:
precheckMsg = Messages.get("nodeRecovery.precheck.fail.other");
break;
}
renderArgs.put("precheckMsg", precheckMsg);
renderArgs.put("precheckStatus", recoveryPrecheckStatus.getStatus().name());
String recoveringMsg = Messages.get("nodeRecovery.recovering.status", recoveryPrecheckStatus.getRecoverables().toString());
renderArgs.put("recoveringMsg", recoveringMsg);
ClusterInfo clusterInfo = AdminDashboardUtils.getClusterInfo();
render(recoveryStatus, clusterInfo);
}
use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.
the class SystemHealth method nodeRecovery.
public static void nodeRecovery() {
ViPRSystemClient client = BourneUtil.getSysClient();
RecoveryStatus recoveryStatus = client.control().getRecoveryStatus();
if (recoveryStatus.getStartTime() != null) {
DateTime startTime = new DateTime(recoveryStatus.getStartTime().getTime());
renderArgs.put("startTime", startTime);
}
if (recoveryStatus.getEndTime() != null) {
DateTime endTime = new DateTime(recoveryStatus.getEndTime().getTime());
renderArgs.put("endTime", endTime);
}
ClusterInfo clusterInfo = AdminDashboardUtils.getClusterInfo();
render(recoveryStatus, clusterInfo);
}
Aggregations