use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartPillarConfigUpdateResult in project cloudbreak by hortonworks.
the class ClusterStartPillarConfigUpdateHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<ClusterStartPillarConfigUpdateRequest> event) {
ClusterStartPillarConfigUpdateRequest request = event.getData();
Selectable response;
try {
pillarConfigUpdateService.doConfigUpdate(request.getResourceId());
response = new ClusterStartPillarConfigUpdateResult(request);
} catch (Exception e) {
LOGGER.warn("Pillar configuration update failed.", e);
response = new PillarConfigUpdateFailed(request.getResourceId(), e);
}
return response;
}
use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.ClusterStartPillarConfigUpdateResult in project cloudbreak by hortonworks.
the class ClusterStartActions method updateClusterDnsEntriesInPem.
@Bean(name = "UPDATING_DNS_IN_PEM_STATE")
public Action<?, ?> updateClusterDnsEntriesInPem() {
return new AbstractClusterAction<>(ClusterStartPillarConfigUpdateResult.class) {
@Override
protected void doExecute(ClusterViewContext context, ClusterStartPillarConfigUpdateResult payload, Map<Object, Object> variables) {
Stack stack = getStackService().getByIdWithListsInTransaction(payload.getResourceId());
clusterStartService.updateDnsEntriesInPem(stack);
sendEvent(context);
}
@Override
protected Selectable createRequest(ClusterViewContext context) {
return new DnsUpdateFinished(context.getStackId());
}
};
}
Aggregations