use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmReconfigureNginxResult in project cloudbreak by hortonworks.
the class ReconfigureNginxHandler method doAccept.
@Override
public Selectable doAccept(HandlerEvent<UpgradeCcmReconfigureNginxRequest> event) {
UpgradeCcmReconfigureNginxRequest request = event.getData();
Long stackId = request.getResourceId();
LOGGER.info("NGINX reconfiguration is needed for previous CCM tunnel type");
try {
upgradeCcmService.reconfigureNginx(stackId);
} catch (CloudbreakOrchestratorException e) {
LOGGER.debug("Failed reconfiguring NGINX with salt state");
return new UpgradeCcmFailedEvent(stackId, request.getOldTunnel(), e);
}
return new UpgradeCcmReconfigureNginxResult(stackId, request.getClusterId(), request.getOldTunnel());
}
Aggregations