Search in sources :

Example 1 with UpgradeCcmReconfigureNginxResult

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());
}
Also used : CloudbreakOrchestratorException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorException) UpgradeCcmReconfigureNginxRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmReconfigureNginxRequest) UpgradeCcmFailedEvent(com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmFailedEvent) UpgradeCcmReconfigureNginxResult(com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmReconfigureNginxResult)

Aggregations

CloudbreakOrchestratorException (com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorException)1 UpgradeCcmFailedEvent (com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmFailedEvent)1 UpgradeCcmReconfigureNginxRequest (com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmReconfigureNginxRequest)1 UpgradeCcmReconfigureNginxResult (com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmReconfigureNginxResult)1