Search in sources :

Example 1 with NotEnoughNodeException

use of com.sequenceiq.cloudbreak.cluster.service.NotEnoughNodeException in project cloudbreak by hortonworks.

the class ClusterDownscaleService method handleClusterDownscaleFailure.

public void handleClusterDownscaleFailure(long stackId, Exception error) {
    String errorDetails = error.getMessage();
    LOGGER.warn("Error during Cluster downscale flow: ", error);
    DetailedStackStatus detailedStackStatus = DetailedStackStatus.DOWNSCALE_FAILED;
    if (error instanceof NotEnoughNodeException || error instanceof NodeIsBusyException) {
        detailedStackStatus = DetailedStackStatus.AVAILABLE;
    }
    stackUpdater.updateStackStatus(stackId, detailedStackStatus, "Node(s) could not be removed from the cluster: " + errorDetails);
    flowMessageService.fireEventAndLog(stackId, UPDATE_FAILED.name(), CLUSTER_SCALING_FAILED, "removed from", errorDetails);
}
Also used : NotEnoughNodeException(com.sequenceiq.cloudbreak.cluster.service.NotEnoughNodeException) DetailedStackStatus(com.sequenceiq.cloudbreak.api.endpoint.v4.common.DetailedStackStatus) NodeIsBusyException(com.sequenceiq.cloudbreak.cluster.service.NodeIsBusyException)

Aggregations

DetailedStackStatus (com.sequenceiq.cloudbreak.api.endpoint.v4.common.DetailedStackStatus)1 NodeIsBusyException (com.sequenceiq.cloudbreak.cluster.service.NodeIsBusyException)1 NotEnoughNodeException (com.sequenceiq.cloudbreak.cluster.service.NotEnoughNodeException)1