public NodeType executionStatus(NodeExecutionStatusType value) { setExecutionStatus(value); return this; }
nodeInfo.setExecutionStatus(NodeExecutionStatusType.DOWN); info.addNodeInfo(nodeInfo); result.recordStatus(OperationResultStatus.SUCCESS, "Node is down"); LoggingUtils.logUnexpectedException(LOGGER, "Cannot connect to the remote node {} at {}", e, nodeIdentifier, address); result.recordWarning("Cannot connect to the remote node " + nodeIdentifier + " at " + address + ": " + e.getMessage(), e); nodeInfo.setExecutionStatus(NodeExecutionStatusType.COMMUNICATION_ERROR); nodeInfo.setConnectionResult(result.createOperationResultType()); info.addNodeInfo(nodeInfo); nodeInfo.setExecutionStatus(NodeExecutionStatusType.ERROR); // this is a mark of error situation (we expect that during ordinary shutdown the node quickly goes down so there is little probability of getting this status on that occasion) } else if (running) { nodeInfo.setExecutionStatus(NodeExecutionStatusType.RUNNING); } else { nodeInfo.setExecutionStatus(NodeExecutionStatusType.PAUSED); LoggingUtils.logUnexpectedException(LOGGER, "Cannot get information from the remote node {} at {}", e, nodeIdentifier, address); result.recordWarning("Cannot get information from the remote node " + nodeIdentifier + " at " + address + ": " + e.getMessage(), e); nodeInfo.setExecutionStatus(NodeExecutionStatusType.COMMUNICATION_ERROR); nodeInfo.setConnectionResult(result.createOperationResultType()); info.addNodeInfo(nodeInfo);
returnedNode.setExecutionStatus(nodeRuntimeInfo.getExecutionStatus()); returnedNode.setErrorStatus(nodeRuntimeInfo.getErrorStatus()); returnedNode.setConnectionResult(nodeRuntimeInfo.getConnectionResult()); returnedNode.setExecutionStatus(NodeExecutionStatusType.COMMUNICATION_ERROR); OperationResult r = new OperationResult("connect"); r.recordFatalError("Node not known at this moment");
private void addNodeAndTaskInformation(ClusterStatusInformation info, PrismObject<NodeType> node, OperationResult parentResult) { OperationResult result = parentResult.createSubresult(ExecutionManager.class.getName() + ".addNodeAndTaskInformation"); result.addParam("node", node); if (isCurrentNode(node)) { LOGGER.trace("Getting node and task info from the current node ({})", node.asObjectable().getNodeIdentifier()); List<ClusterStatusInformation.TaskInfo> taskInfoList = new ArrayList<>(); Set<Task> tasks = localNodeManager.getLocallyRunningTasks(result); for (Task task : tasks) { taskInfoList.add(new ClusterStatusInformation.TaskInfo(task.getOid())); } node.asObjectable().setExecutionStatus(localNodeManager.getLocalNodeExecutionStatus()); node.asObjectable().setErrorStatus(taskManager.getLocalNodeErrorStatus()); info.addNodeAndTaskInfo(node.asObjectable(), taskInfoList); } else { // if remote LOGGER.debug("Getting running task info from remote node ({}, {})", node.asObjectable().getNodeIdentifier(), node.asObjectable().getHostname()); remoteNodesManager.addNodeStatusFromRemoteNode(info, node, result); } result.recordSuccessIfUnknown(); }