public void setupProvisioning(CloudPlatform cloudPlatform, Long stackId) {
Stack stack = stackRepository.findById(stackId);
MDCBuilder.buildMdcContext(stack);
try {
ProvisionSetup provisionSetup = provisionSetups.get(cloudPlatform);
provisionSetup.setupProvisioning(stackRepository.findById(stackId));
} catch (Exception e) {
LOGGER.error("Unhandled exception occured while setting up provisioning.", e);
LOGGER.info("Publishing {} event", ReactorConfig.STACK_CREATE_FAILED_EVENT);
reactor.notify(ReactorConfig.STACK_CREATE_FAILED_EVENT, Event.wrap(new StackOperationFailure(stackId,
"Internal server error occured while setting up provisioning.")));