report.setMessage(msg);
return;
}
if (cRef != null) {
HealthChecker hc = cRef.getHealthChecker();
if (hc != null) {
removeHealthCheckerFromClusterRef(cRef);
String msg = localStrings.getLocalString("http_lb_admin.HealthCheckerDeleted",
"Health checker deleted for target {0}", target);
logger.info(msg);
} else {
if (ignoreFailure == false) {
String msg = localStrings.getLocalString("HealthCheckerDoesNotExist",
"Health checker does not exist for target {0} in LB {1}", target, lbConfigName);
report.setActionExitCode(ActionReport.ExitCode.FAILURE);
report.setMessage(msg);
return;
}
}
}
// target is a server
} else if (domain.isServer(target)) {
ServerRef sRef = lbConfig.getRefByRef(ServerRef.class, target);
// server is not associated to this lb config
if ((sRef == null) && (ignoreFailure == false)) {
String msg = localStrings.getLocalString("UnassociatedServer",
"Load balancer configuration [{0}] does not have a reference to the given server [{1}].",
lbConfigName, target);
report.setActionExitCode(ActionReport.ExitCode.FAILURE);
report.setMessage(msg);
return;
}
if (sRef != null) {
HealthChecker hc = sRef.getHealthChecker();
if (hc != null) {
removeHealthCheckerFromServerRef(sRef);
String msg = localStrings.getLocalString("http_lb_admin.HealthCheckerDeleted",
"Health checker deleted for target {0}", target);
logger.info(msg);