use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorServiceTest method testDisableInvertingProxyAgent.
@Test
void testDisableInvertingProxyAgent() throws CloudbreakOrchestratorException {
underTest.disableInvertingProxyAgent(STACK_ID);
verify(hostOrchestrator).runOrchestratorState(paramCaptor.capture());
OrchestratorStateParams params = paramCaptor.getValue();
assertThat(params.getState()).isEqualTo("upgradeccm/disable-ccmv2");
assertOtherStateParams(params);
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorServiceTest method testReconfigureNginx.
@Test
void testReconfigureNginx() throws CloudbreakOrchestratorException {
underTest.reconfigureNginx(STACK_ID);
verify(hostOrchestrator).runOrchestratorState(paramCaptor.capture());
OrchestratorStateParams params = paramCaptor.getValue();
assertThat(params.getState()).isEqualTo("nginx");
assertOtherStateParams(params);
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class CreateFullBackupHandler method createOrchestratorStateParams.
private OrchestratorStateParams createOrchestratorStateParams(Stack stack, Set<Node> nodes) {
GatewayConfig primaryGatewayConfig = gatewayConfigService.getPrimaryGatewayConfig(stack);
OrchestratorStateParams stateParameters = new OrchestratorStateParams();
stateParameters.setPrimaryGatewayConfig(primaryGatewayConfig);
stateParameters.setState("freeipa.backup-full");
stateParameters.setAllNodes(nodes);
LOGGER.debug("Created OrchestratorStateParams for running full backup: {}", stateParameters);
return stateParameters;
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class CreateFullBackupHandler method doAccept.
@Override
protected Selectable doAccept(HandlerEvent<CreateFullBackupEvent> event) {
Stack stack = stackService.getByIdWithListsInTransaction(event.getData().getResourceId());
MDCBuilder.buildMdcContext(stack);
Set<Node> nodes = nodeService.mapInstancesToNodes(stack.getNotDeletedInstanceMetaDataSet());
OrchestratorStateParams stateParameters = createOrchestratorStateParams(stack, nodes);
try {
runBackupForNodesSequentially(nodes, stateParameters);
return new StackEvent(FullBackupEvent.FULL_BACKUP_SUCCESSFUL_EVENT.event(), event.getData().getResourceId());
} catch (CloudbreakOrchestratorFailedException | CloneNotSupportedException e) {
LOGGER.error("Full backup failed for node: {}", stateParameters.getTargetHostNames(), e);
return new StackFailureEvent(FullBackupEvent.FULL_BACKUP_FAILED_EVENT.event(), event.getData().getResourceId(), e);
}
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorServiceTest method testDisableMina.
@Test
void testDisableMina() throws CloudbreakOrchestratorException {
underTest.disableMina(STACK_ID);
verify(hostOrchestrator).runOrchestratorState(paramCaptor.capture());
OrchestratorStateParams params = paramCaptor.getValue();
assertThat(params.getState()).isEqualTo("upgradeccm/disable-ccmv1");
assertOtherStateParams(params);
}
Aggregations