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);
}
Aggregations