Search in sources :

Example 1 with MinorityNodeRecoveryJob

use of jobs.MinorityNodeRecoveryJob in project coprhd-controller by CoprHD.

the class SystemHealth method minorityNodeRecovery.

@Restrictions({ @Restrict("SYSTEM_ADMIN"), @Restrict("SECURITY_ADMIN"), @Restrict("RESTRICTED_SECURITY_ADMIN") })
public static void minorityNodeRecovery() {
    new MinorityNodeRecoveryJob(getSysClient()).in(3);
    ViPRSystemClient client = BourneUtil.getSysClient();
    List<NodeHealth> nodeHealthList = MonitorUtils.getNodeHealth();
    ClusterInfo clusterInfo = AdminDashboardUtils.getClusterInfo();
    if (PlatformUtils.isVMwareVapp()) {
        RecoveryPrecheckStatus recoveryPrecheckStatus = client.control().getRecoveryPrecheckStatus();
        String recoveringMsg = Messages.get("nodeRecovery.recovering.status", recoveryPrecheckStatus.getRecoverables().toString());
        renderArgs.put("recoveringMsg", recoveringMsg);
    }
    RecoveryStatus recoveryStatus = client.control().getRecoveryStatus();
    renderArgs.put("nodeHealthList", nodeHealthList);
    renderArgs.put("clusterInfo", clusterInfo);
    renderArgs.put("recoveryStatus", recoveryStatus);
    if (PlatformUtils.isVMwareVapp()) {
        render("@nodeRecoveryVapp");
    } else {
        render("@nodeRecovery");
    }
}
Also used : MinorityNodeRecoveryJob(jobs.MinorityNodeRecoveryJob) ViPRSystemClient(com.emc.vipr.client.ViPRSystemClient) ClusterInfo(com.emc.vipr.model.sys.ClusterInfo) RecoveryPrecheckStatus(com.emc.vipr.model.sys.recovery.RecoveryPrecheckStatus) RecoveryStatus(com.emc.vipr.model.sys.recovery.RecoveryStatus) NodeHealth(com.emc.vipr.model.sys.healthmonitor.NodeHealth) Restrictions(controllers.deadbolt.Restrictions)

Aggregations

ViPRSystemClient (com.emc.vipr.client.ViPRSystemClient)1 ClusterInfo (com.emc.vipr.model.sys.ClusterInfo)1 NodeHealth (com.emc.vipr.model.sys.healthmonitor.NodeHealth)1 RecoveryPrecheckStatus (com.emc.vipr.model.sys.recovery.RecoveryPrecheckStatus)1 RecoveryStatus (com.emc.vipr.model.sys.recovery.RecoveryStatus)1 Restrictions (controllers.deadbolt.Restrictions)1 MinorityNodeRecoveryJob (jobs.MinorityNodeRecoveryJob)1