Search in sources :

Example 1 with NodeStatus

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;
}
Also used : StatusDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails) NodeStatusReport(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatusReport) RPCResponse(com.sequenceiq.cloudbreak.client.RPCResponse) NodeStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus)

Example 2 with NodeStatus

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;
}
Also used : ServiceStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus) StatusDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails) NodeStatusReport(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatusReport) RPCResponse(com.sequenceiq.cloudbreak.client.RPCResponse) NodeStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus) ServicesDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServicesDetails)

Example 3 with NodeStatus

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);
        }
    }
}
Also used : NetworkDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NetworkDetails) NodeStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus)

Aggregations

NodeStatus (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus)3 NodeStatusReport (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatusReport)2 StatusDetails (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails)2 RPCResponse (com.sequenceiq.cloudbreak.client.RPCResponse)2 NetworkDetails (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NetworkDetails)1 ServiceStatus (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus)1 ServicesDetails (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServicesDetails)1