use of com.sequenceiq.cloudbreak.service.cluster.NotEnoughNodeException in project cloudbreak by hortonworks.
the class ClusterDownscaleService method handleClusterDownscaleFailure.
public void handleClusterDownscaleFailure(long stackId, Exception error) {
String errorDetailes = error.getMessage();
LOGGER.error("Error during Cluster downscale flow: ", error);
Status status = UPDATE_FAILED;
if (error instanceof NotEnoughNodeException) {
status = AVAILABLE;
}
clusterService.updateClusterStatusByStackId(stackId, status, errorDetailes);
stackUpdater.updateStackStatus(stackId, DetailedStackStatus.AVAILABLE, "Node(s) could not be removed from the cluster: " + errorDetailes);
flowMessageService.fireEventAndLog(stackId, Msg.AMBARI_CLUSTER_SCALING_FAILED, UPDATE_FAILED.name(), "removed from", errorDetailes);
}
Aggregations