use of com.sequenceiq.freeipa.flow.freeipa.provision.event.bootstrap.BootstrapMachinesFailed in project cloudbreak by hortonworks.
the class BootstrapMachineHandler method accept.
@Override
public void accept(Event<BootstrapMachinesRequest> event) {
BootstrapMachinesRequest request = event.getData();
Selectable response;
try {
bootstrapService.bootstrap(request.getResourceId());
response = new BootstrapMachinesSuccess(request.getResourceId());
} catch (Exception e) {
LOGGER.error("Bootstrap failed", e);
response = new BootstrapMachinesFailed(request.getResourceId(), e);
}
eventBus.notify(response.selector(), new Event<>(event.getHeaders(), response));
}
use of com.sequenceiq.freeipa.flow.freeipa.provision.event.bootstrap.BootstrapMachinesFailed in project cloudbreak by hortonworks.
the class BootstrapMachinesFailedToUpscaleFailureEventConverter method convert.
@Override
public UpscaleFailureEvent convert(Object payload) {
BootstrapMachinesFailed result = (BootstrapMachinesFailed) payload;
UpscaleFailureEvent event = new UpscaleFailureEvent(result.getResourceId(), "Bootstrapping machines", Set.of(), Map.of(), new Exception("Payload failed: " + payload));
return event;
}
Aggregations