use of com.sequenceiq.freeipa.flow.stack.upgrade.ccm.event.UpgradeCcmEvent in project cloudbreak by hortonworks.
the class UpgradeCcmUpgradeHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<UpgradeCcmEvent> event) {
UpgradeCcmEvent request = event.getData();
if (request.getOldTunnel().useCcmV1()) {
try {
LOGGER.info("Running upgrade state for CCM...");
upgradeCcmService.upgrade(request.getResourceId());
} catch (CloudbreakOrchestratorException e) {
LOGGER.debug("Failed applying CCM upgrade state");
return new UpgradeCcmFailureEvent(UPGRADE_CCM_FAILED_EVENT.event(), request.getResourceId(), e);
}
} else {
LOGGER.info("Running upgrade step is skipped for previous tunnel type '{}'", request.getOldTunnel());
}
return UPGRADE_CCM_UPGRADE_FINISHED_EVENT.createBasedOn(request);
}
Aggregations