}
awsStackUtil.sleep(stack, POLLING_INTERVAL);
pollingAttempt++;
}
if (pollingAttempt >= MAX_POLLING_ATTEMPTS) {
throw new AmbariHostsUnavailableException(String.format("Operation timed out. Failed to start Ambari server in %s seconds.",
MAX_POLLING_ATTEMPTS * POLLING_INTERVAL / MS_PER_SEC));
}
LOGGER.info("Publishing {} event.", ReactorConfig.STACK_CREATE_SUCCESS_EVENT);
reactor.notify(ReactorConfig.STACK_CREATE_SUCCESS_EVENT, Event.wrap(new StackCreationSuccess(stackId, ambariIp)));
} catch (Exception e) {