Search in sources :

Example 1 with TerminationFailedException

use of com.sequenceiq.freeipa.flow.stack.termination.TerminationFailedException in project cloudbreak by hortonworks.

the class TerminationService method requestDeletion.

public void requestDeletion(Long stackId, List<String> instanceIds) {
    try {
        transactionService.required(() -> {
            Stack stack = stackService.getByIdWithListsInTransaction(stackId);
            requestDeletionForInstances(stack, instanceIds);
        });
    } catch (TransactionExecutionException ex) {
        LOGGER.info("Failed to request deletion for cluster infrastructure.");
        throw new TerminationFailedException(ex);
    }
}
Also used : TransactionExecutionException(com.sequenceiq.cloudbreak.common.service.TransactionService.TransactionExecutionException) TerminationFailedException(com.sequenceiq.freeipa.flow.stack.termination.TerminationFailedException) Stack(com.sequenceiq.freeipa.entity.Stack)

Example 2 with TerminationFailedException

use of com.sequenceiq.freeipa.flow.stack.termination.TerminationFailedException in project cloudbreak by hortonworks.

the class TerminationService method finalizeTermination.

public void finalizeTermination(Long stackId, List<String> instanceIds) {
    try {
        transactionService.required(() -> {
            Stack stack = stackService.getByIdWithListsInTransaction(stackId);
            terminateMetaDataInstances(stack, instanceIds);
        });
    } catch (TransactionExecutionException ex) {
        LOGGER.info("Failed to terminate cluster infrastructure.");
        throw new TerminationFailedException(ex);
    }
}
Also used : TransactionExecutionException(com.sequenceiq.cloudbreak.common.service.TransactionService.TransactionExecutionException) TerminationFailedException(com.sequenceiq.freeipa.flow.stack.termination.TerminationFailedException) Stack(com.sequenceiq.freeipa.entity.Stack)

Aggregations

TransactionExecutionException (com.sequenceiq.cloudbreak.common.service.TransactionService.TransactionExecutionException)2 Stack (com.sequenceiq.freeipa.entity.Stack)2 TerminationFailedException (com.sequenceiq.freeipa.flow.stack.termination.TerminationFailedException)2