stateService.setState(server.getName(), InstanceState.StateType.NO_RESPONSE, true); stateService.removeFailedCommandsForInstance(server.getName()); } catch (Exception ex) { if (logger.isLoggable(Level.FINE)) {
public final String getDisplayState() { StringBuilder display = new StringBuilder(); display.append(isRunning() ? InstanceState.StateType.RUNNING.getDisplayString() : InstanceState.StateType.NOT_RUNNING.getDisplayString()); if (ssState == InstanceState.StateType.RESTART_REQUIRED) { if (isRunning()) { display.append("; ").append(InstanceState.StateType.RESTART_REQUIRED.getDisplayString()); } List<String> failedCmds = stateService.getFailedCommands(name); if (!failedCmds.isEmpty()) { StringBuilder list = new StringBuilder(); for (String z : failedCmds) list.append(z).append("; "); display.append(" [pending config changes are: ").append(list).append("]"); } } return display.toString(); }
try { for(Server svr : instancesForReplication) { if (instanceState.getState(svr.getName()) == InstanceState.StateType.NEVER_STARTED) { subdirectoryForInstance(intermediateDownloadDir, ice)); Future<InstanceCommandResult> f = instanceState.submitJob(svr, ice, aResult); if(f==null) { logger.severe(strings.getLocalString("clusterutil.instancehasnostate", returnValue = finalResult; if(finalResult != ActionReport.ExitCode.SUCCESS) { instanceState.setState(s, InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s, commandName, parameters); if(returnValue == ActionReport.ExitCode.SUCCESS) returnValue = finalResult; instanceState.setState(s, InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s, commandName, parameters); InstanceStateService instanceState = habitat.getComponent(InstanceStateService.class); for(Server s : targetService.getInstances(t)) { instanceState.setState(s.getName(), InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s.getName(), commandName, parameters);
" dynamic-reconfig-enabled flag is set to false for cluster {0}", targetName)); for(Server s : targetService.getInstances(targetName)) { instanceState.setState(s.getName(), InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s.getName(), commandName, parameters); } else { clusterNoReplication.add(s.getCluster().getName()); instanceState.setState(s.getName(), InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s.getName(), commandName, parameters);
: InstanceState.StateType.NOT_RUNNING.getDescription(); InstanceState.StateType state = (ii.isRunning()) ? (stateService.setState(name, InstanceState.StateType.RUNNING, false)) : (stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false)); List<String> failedCmds = stateService.getFailedCommands(name); if (state == InstanceState.StateType.RESTART_REQUIRED) { if (ii.isRunning()) {
running = false; pid = -1; ssState = stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false); ssState = stateService.setState(name, Boolean.parseBoolean(restartstr) ? InstanceState.StateType.RESTART_REQUIRED : uptime = -1; state = NOT_RUNNING; ssState = stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false); running = false; pid = -1;
state.addServerToStateService(parameters.getOne("DEFAULT")); state.removeInstanceFromStateService(parameters.getOne("DEFAULT"));
private Future<InstanceCommandResult> pingInstance() { try { ActionReport aReport = report.addSubActionsReport(); InstanceCommandResult aResult = new InstanceCommandResult(); ParameterMap map = new ParameterMap(); map.set("type", "terse"); InstanceCommandExecutor ice = new InstanceCommandExecutor(habitat, "__locations", FailurePolicy.Error, FailurePolicy.Error, svr, host, port, logger, map, aReport, aResult); return stateService.submitJob(svr, ice, aResult); /* String ret = rac.executeCommand(map).trim(); if (ret == null || (!ret.endsWith("/" + name))) return -1; running = true; String uptimeStr = rac.getAttributes().get("Uptime_value"); return Long.parseLong(uptimeStr); */ } catch (CommandException ex) { running = false; return null; } }
try { for(Server svr : instancesForReplication) { if (instanceState.getState(svr.getName()) == InstanceState.StateType.NEVER_STARTED) { "dynamic-reconfiguration-enabled flag is set to false for config {2}", new Object[] {commandName, svr.getName(), scfg.getName()})); instanceState.setState(svr.getName(), InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(svr.getName(), commandName, parameters); returnValue = ActionReport.ExitCode.WARNING; continue; new File(intermediateDownloadDir, ice.getServer().getName())); f = instanceState.submitJob(svr, ice, aResult); } else { logger.log(Level.FINEST, "replicateCommand(): Use traditional way for replication - {0}", commandName); new File(intermediateDownloadDir, ice.getServer().getName())); f = instanceState.submitJob(svr, ice, aResult); instanceState.setState(s, InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s, commandName, parameters); if(returnValue == ActionReport.ExitCode.SUCCESS) returnValue = finalResult; instanceState.setState(s, InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s, commandName, parameters);
" dynamic-reconfig-enabled flag is set to false for cluster {0}", targetName)); for(Server s : targetService.getInstances(targetName)) { instanceState.setState(s.getName(), InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s.getName(), commandName, parameters); } else { clusterNoReplication.add(s.getCluster().getName()); instanceState.setState(s.getName(), InstanceState.StateType.RESTART_REQUIRED, false); instanceState.addFailedCommandToInstance(s.getName(), commandName, parameters);
: InstanceState.StateType.NOT_RUNNING.getDescription(); InstanceState.StateType state = (ii.isRunning()) ? (stateService.setState(name, InstanceState.StateType.RUNNING, false)) : (stateService.setState(name, InstanceState.StateType.NOT_RUNNING, false)); List<String> failedCmds = stateService.getFailedCommands(name); if (state == InstanceState.StateType.RESTART_REQUIRED) { if (ii.isRunning()) {
state.addServerToStateService(parameters.getOne("DEFAULT")); state.removeInstanceFromStateService(parameters.getOne("DEFAULT"));
stateService.setState(server.getName(), InstanceState.StateType.NO_RESPONSE, true); stateService.removeFailedCommandsForInstance(server.getName()); } catch (Exception ex) { logger.fine("SynchronizeFiles: Exception processing request");