use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus in project cloudbreak by hortonworks.
the class NetworkCheckerConclusionStepTest method createNetworkReportResponse.
private RPCResponse<NodeStatusReport> createNetworkReportResponse(NetworkDetails networkDetails) {
StatusDetails statusDetails = StatusDetails.newBuilder().setHost("host1").build();
NodeStatus nodeStatus = NodeStatus.newBuilder().setStatusDetails(statusDetails).setNetworkDetails(networkDetails).build();
NodeStatusReport nodeStatusReport = NodeStatusReport.newBuilder().addNodes(nodeStatus).build();
RPCResponse<NodeStatusReport> response = new RPCResponse<>();
response.setResult(nodeStatusReport);
return response;
}
use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus in project cloudbreak by hortonworks.
the class NodeServicesCheckerConclusionStepTest method createNodeStatusResponse.
private RPCResponse<NodeStatusReport> createNodeStatusResponse(HealthStatus saltBootstrapServiceStatus) {
StatusDetails statusDetails = StatusDetails.newBuilder().setHost("host1").build();
ServiceStatus serviceStatus = ServiceStatus.newBuilder().setName("salt-bootstrap").setStatus(saltBootstrapServiceStatus).build();
ServicesDetails servicesDetails = ServicesDetails.newBuilder().addInfraServices(serviceStatus).build();
NodeStatus nodeStatus = NodeStatus.newBuilder().setStatusDetails(statusDetails).setServicesDetails(servicesDetails).build();
NodeStatusReport nodeStatusReport = NodeStatusReport.newBuilder().addNodes(nodeStatus).build();
RPCResponse<NodeStatusReport> response = new RPCResponse<>();
response.setResult(nodeStatusReport);
return response;
}
use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus in project cloudbreak by hortonworks.
the class NetworkCheckerConclusionStep method checkNetworkFailures.
private void checkNetworkFailures(RPCResponse<NodeStatusReport> networkReport, List<String> networkFailures, List<String> networkFailureDetails) {
for (NodeStatus nodeStatus : networkReport.getResult().getNodesList()) {
NetworkDetails networkDetails = nodeStatus.getNetworkDetails();
String host = nodeStatus.getStatusDetails().getHost();
if (networkDetails.getCcmEnabled() && HealthStatus.NOK.equals(networkDetails.getCcmAccessible())) {
networkFailures.add("CCM is not accessible from node " + host + ". Please check network settings!");
String details = String.format("CCM health status is %s for node %s", networkDetails.getCcmAccessible(), host);
networkFailureDetails.add(details);
LOGGER.warn(details);
}
if (HealthStatus.NOK.equals(networkDetails.getClouderaComAccessible())) {
networkFailures.add("Cloudera.com is not accessible from node: " + host + ". Please check network settings!");
String details = String.format("Cloudera.com accessibility status is %s for node %s", networkDetails.getClouderaComAccessible(), host);
networkFailureDetails.add(details);
LOGGER.warn(details);
}
if (networkDetails.getNeighbourScan() && HealthStatus.NOK.equals(networkDetails.getAnyNeighboursAccessible())) {
networkFailures.add("Node " + host + " cannot reach any neighbour nodes. Please check nodes and network settings!");
String details = String.format("Neighbours accessibility status is %s for node %s", networkDetails.getAnyNeighboursAccessible(), host);
networkFailureDetails.add(details);
LOGGER.warn(details);
}
}
}
Aggregations