private static File subdirectoryForInstance(final File dir, final InstanceCommandExecutor exec) { return new File(dir, exec.getServer().getName()); } }
if ((!instanceLocation.endsWith(res.getServer().getName())) || (res.getReport().getActionExitCode() != ActionReport.ExitCode.SUCCESS)) { uptime = -1;
if(StringUtils.ok(getCommandOutput())) aReport.setMessage(strings.getLocalString("ice.successmessage", "{0}:\n{1}\n", getServer().getName(), getCommandOutput())); Map<String, String> attributes = this.getAttributes(); for(Map.Entry<String, String> ae : attributes.entrySet()) { aReport.setMessage(strings.getLocalString("clusterutil.warnoffline", "WARNING: Instance {0} seems to be offline; command {1} was not replicated to that instance", getServer().getName(), commandName)); else aReport.setMessage(strings.getLocalString("clusterutil.failoffline", "FAILURE: Instance {0} seems to be offline; command {1} was not replicated to that instance", getServer().getName(), commandName)); } else { finalResult = FailurePolicy.applyFailurePolicy(failPolicy, ActionReport.ExitCode.FAILURE); if(finalResult.equals(ActionReport.ExitCode.FAILURE)) aReport.setMessage(strings.getLocalString("clusterutil.commandFailed", "FAILURE: Command {0} failed on server instance {1}: {2}", commandName, getServer().getName(), cmdEx.getMessage())); else aReport.setMessage(strings.getLocalString("clusterutil.commandWarning", "WARNING: Command {0} did not complete successfully on server instance {1}: {2}", commandName, getServer().getName(), cmdEx.getMessage()));
if(StringUtils.ok(getCommandOutput())) aReport.setMessage(strings.getLocalString("ice.successmessage", "{0}:\n{1}\n", getServer().getName(), getCommandOutput())); Map<String, String> attributes = this.getAttributes(); for(String key : attributes.keySet()) { aReport.setMessage(strings.getLocalString("clusterutil.warnoffline", "WARNING: Instance {0} seems to be offline; command {1} was not replicated to that instance", getServer().getName(), commandName)); else aReport.setMessage(strings.getLocalString("clusterutil.failoffline", "FAILURE: Instance {0} seems to be offline; command {1} was not replicated to that instance", getServer().getName(), commandName)); } else { finalResult = FailurePolicy.applyFailurePolicy(failPolicy, ActionReport.ExitCode.FAILURE); if(finalResult.equals(ActionReport.ExitCode.FAILURE)) aReport.setMessage(strings.getLocalString("clusterutil.commandFailed", "FAILURE: Command {0} failed on server instance {1}: {2}", commandName, getServer().getName(), cmdEx.getMessage())); else aReport.setMessage(strings.getLocalString("clusterutil.commandWarning", "WARNING: Command {0} did not complete successfully on server instance {1}: {2}", commandName, getServer().getName(), cmdEx.getMessage()));
new InstanceCommandExecutor(habitat, commandName, failPolicy, offlinePolicy, svr, host, port, logger, parameters, aReport, aResult); if (CommandTarget.DAS.isValid(habitat, ice.getServer().getName())) continue; if (intermediateDownloadDir != null) { InstanceCommandExecutor ice = (InstanceCommandExecutor) aResult.getInstanceCommand(); if(ice.getReport().getActionExitCode() != ActionReport.ExitCode.FAILURE) completedInstances.add(ice.getServer()); finalResult = FailurePolicy.applyFailurePolicy(failPolicy, ice.getReport().getActionExitCode()); if(returnValue == ActionReport.ExitCode.SUCCESS)
new InstanceCommandExecutor(habitat, commandName, failPolicy, offlinePolicy, svr, host, port, logger, parameters, aReport, aResult); if (CommandTarget.DAS.isValid(habitat, ice.getServer().getName())) { continue; new File(intermediateDownloadDir, ice.getServer().getName())); InstanceCommandExecutor ice = (InstanceCommandExecutor) aResult.getInstanceCommand(); iReport = ice.getReport(); iServer = ice.getServer();