Search in sources :

Example 6 with FAILED

use of com.sequenceiq.freeipa.api.v1.freeipa.user.model.SynchronizationStatus.FAILED in project cloudbreak by hortonworks.

the class FreeIpaUpgradeTests method cleanUp.

private void cleanUp(TestContext testContext, com.sequenceiq.freeipa.api.client.FreeIpaClient ipaClient, String environmentCrn) {
    try {
        CleanupRequest cleanupRequest = new CleanupRequest();
        cleanupRequest.setEnvironmentCrn(environmentCrn);
        cleanupRequest.setClusterName("testuser");
        cleanupRequest.setUsers(Set.of("kerberosbind-testuser", "ldapbind-testuser"));
        OperationStatus operationStatus = ipaClient.getFreeIpaV1Endpoint().cleanup(cleanupRequest);
        waitToCompleted(testContext, operationStatus.getOperationId(), "cleanupOperation");
    } catch (Exception e) {
        logger.error("CLEANUP test failed during upgrade", e);
    // throw new TestFailException("CLEANUP test failed during upgrade with: " + e.getMessage(), e);
    }
}
Also used : OperationStatus(com.sequenceiq.freeipa.api.v1.operation.model.OperationStatus) SyncOperationStatus(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SyncOperationStatus) CleanupRequest(com.sequenceiq.freeipa.api.v1.freeipa.cleanup.CleanupRequest) WebApplicationException(javax.ws.rs.WebApplicationException) TestFailException(com.sequenceiq.it.cloudbreak.exception.TestFailException)

Example 7 with FAILED

use of com.sequenceiq.freeipa.api.v1.freeipa.user.model.SynchronizationStatus.FAILED in project cloudbreak by hortonworks.

the class FreeIpaUpgradeTests method addListDeleteDnsZonesBySubnet.

private void addListDeleteDnsZonesBySubnet(com.sequenceiq.freeipa.api.client.FreeIpaClient ipaClient, String environmentCrn) {
    try {
        AddDnsZoneForSubnetsRequest request = new AddDnsZoneForSubnetsRequest();
        request.setSubnets(List.of("10.0.1.0/24", "192.168.1.0/24"));
        request.setEnvironmentCrn(environmentCrn);
        ipaClient.getDnsV1Endpoint().addDnsZoneForSubnets(request);
        /*          Until CB-15454 is fixed
            Set<String> dnsZones = ipaClient.getDnsV1Endpoint().listDnsZones(environmentCrn);
            Assertions.assertTrue(dnsZones.stream().anyMatch(dnsZone -> dnsZone.startsWith("1.0.10")));
            Assertions.assertTrue(dnsZones.stream().anyMatch(dnsZone -> dnsZone.startsWith("1.168.192")));*/
        ipaClient.getDnsV1Endpoint().deleteDnsZoneBySubnet(environmentCrn, "192.168.1.0/24");
        ipaClient.getDnsV1Endpoint().deleteDnsZoneBySubnet(environmentCrn, "10.0.1.0/24");
    /*            dnsZones = ipaClient.getDnsV1Endpoint().listDnsZones(environmentCrn);
            Assertions.assertFalse(dnsZones.stream().anyMatch(dnsZone -> dnsZone.startsWith("1.0.10")));
            Assertions.assertFalse(dnsZones.stream().anyMatch(dnsZone -> dnsZone.startsWith("1.168.192")));*/
    } catch (Exception e) {
        logger.error("DNS ZONE test failed during upgrade", e);
        throw new TestFailException("DNS ZONE test failed during upgrade with: " + e.getMessage(), e);
    }
}
Also used : AddDnsZoneForSubnetsRequest(com.sequenceiq.freeipa.api.v1.dns.model.AddDnsZoneForSubnetsRequest) TestFailException(com.sequenceiq.it.cloudbreak.exception.TestFailException) WebApplicationException(javax.ws.rs.WebApplicationException) TestFailException(com.sequenceiq.it.cloudbreak.exception.TestFailException)

Example 8 with FAILED

use of com.sequenceiq.freeipa.api.v1.freeipa.user.model.SynchronizationStatus.FAILED in project cloudbreak by hortonworks.

the class StartBindUserCreationServiceTest method testOperationFailed.

@Test
public void testOperationFailed() {
    OperationStatus operationStatus = new OperationStatus(OPERATION_ID, OperationType.BIND_USER_CREATE, OperationState.FAILED, List.of(), List.of(), "errMsg", 1L, 2L);
    when(freeIpaV1Endpoint.createBindUser(any(BindUserCreateRequest.class), anyString())).thenReturn(operationStatus);
    when(regionAwareInternalCrnGenerator.getInternalCrnForServiceAsString()).thenReturn("crn:cdp:freeipa:us-west-1:altus:user:__internal__actor__");
    when(regionAwareInternalCrnGeneratorFactory.iam()).thenReturn(regionAwareInternalCrnGenerator);
    StackEvent result = ThreadBasedUserCrnProvider.doAs(USER_CRN, () -> underTest.startBindUserCreation(stackView));
    assertEquals(VALIDATE_KERBEROS_CONFIG_FAILED_EVENT.event(), result.selector());
    assertEquals(STACK_ID, result.getResourceId());
    assertEquals("Failed to start bind user creation operation: errMsg", ((StackFailureEvent) result).getException().getMessage());
}
Also used : BindUserCreateRequest(com.sequenceiq.freeipa.api.v1.freeipa.stack.model.binduser.BindUserCreateRequest) StackEvent(com.sequenceiq.cloudbreak.reactor.api.event.StackEvent) StackFailureEvent(com.sequenceiq.cloudbreak.reactor.api.event.StackFailureEvent) OperationStatus(com.sequenceiq.freeipa.api.v1.operation.model.OperationStatus) Test(org.junit.jupiter.api.Test)

Example 9 with FAILED

use of com.sequenceiq.freeipa.api.v1.freeipa.user.model.SynchronizationStatus.FAILED in project cloudbreak by hortonworks.

the class FreeIpaUpscaleActions method upscaleFailureAction.

@Bean(name = "UPSCALE_FAIL_STATE")
public Action<?, ?> upscaleFailureAction() {
    return new AbstractUpscaleAction<>(UpscaleFailureEvent.class) {

        @Inject
        private OperationService operationService;

        @Override
        protected StackContext createFlowContext(FlowParameters flowParameters, StateContext<UpscaleState, UpscaleFlowEvent> stateContext, UpscaleFailureEvent payload) {
            Flow flow = getFlow(flowParameters.getFlowId());
            flow.setFlowFailed(payload.getException());
            return super.createFlowContext(flowParameters, stateContext, payload);
        }

        @Override
        protected void doExecute(StackContext context, UpscaleFailureEvent payload, Map<Object, Object> variables) {
            LOGGER.error("Upscale failed with payload: " + payload);
            Stack stack = context.getStack();
            String environmentCrn = stack.getEnvironmentCrn();
            SuccessDetails successDetails = new SuccessDetails(environmentCrn);
            successDetails.getAdditionalDetails().put(payload.getFailedPhase(), payload.getSuccess() == null ? List.of() : new ArrayList<>(payload.getSuccess()));
            String message = "Upscale failed during " + payload.getFailedPhase();
            FailureDetails failureDetails = new FailureDetails(environmentCrn, message);
            if (payload.getFailureDetails() != null) {
                failureDetails.getAdditionalDetails().putAll(payload.getFailureDetails());
            }
            String errorReason = getErrorReason(payload.getException());
            stackUpdater.updateStackStatus(context.getStack().getId(), getFailedStatus(variables), errorReason);
            operationService.failOperation(stack.getAccountId(), getOperationId(variables), message, List.of(successDetails), List.of(failureDetails));
            enableStatusChecker(stack, "Failed upscaling FreeIPA");
            enableNodeStatusChecker(stack, "Failed upscaling FreeIPA");
            sendEvent(context, FAIL_HANDLED_EVENT.event(), payload);
        }

        @Override
        protected void initPayloadConverterMap(List<PayloadConverter<UpscaleFailureEvent>> payloadConverters) {
            payloadConverters.add(new UpscaleStackResultToUpscaleFailureEventConverter());
            payloadConverters.add(new CollectMetadataResultToUpscaleFailureEventConverter());
            payloadConverters.add(new BootstrapMachinesFailedToUpscaleFailureEventConverter());
            payloadConverters.add(new HostMetadataSetupFailedToUpscaleFailureEventConverter());
            payloadConverters.add(new InstallFreeIpaServicesFailedToUpscaleFailureEventConverter());
            payloadConverters.add(new ClusterProxyUpdateRegistrationFailedToUpscaleFailureEventConverter());
            payloadConverters.add(new PostInstallFreeIpaFailedToUpscaleFailureEventConverter());
        }
    };
}
Also used : SuccessDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails) ClusterProxyUpdateRegistrationFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.ClusterProxyUpdateRegistrationFailedToUpscaleFailureEventConverter) StateContext(org.springframework.statemachine.StateContext) ArrayList(java.util.ArrayList) PostInstallFreeIpaFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.PostInstallFreeIpaFailedToUpscaleFailureEventConverter) BootstrapMachinesFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.BootstrapMachinesFailedToUpscaleFailureEventConverter) FailureDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.FailureDetails) Flow(com.sequenceiq.flow.core.Flow) Stack(com.sequenceiq.freeipa.entity.Stack) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) HostMetadataSetupFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.HostMetadataSetupFailedToUpscaleFailureEventConverter) FlowParameters(com.sequenceiq.flow.core.FlowParameters) StackContext(com.sequenceiq.freeipa.flow.stack.StackContext) UpscaleStackResultToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.UpscaleStackResultToUpscaleFailureEventConverter) UpscaleFailureEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleFailureEvent) ArrayList(java.util.ArrayList) List(java.util.List) OperationService(com.sequenceiq.freeipa.service.operation.OperationService) InstallFreeIpaServicesFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.InstallFreeIpaServicesFailedToUpscaleFailureEventConverter) Map(java.util.Map) CollectMetadataResultToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.CollectMetadataResultToUpscaleFailureEventConverter) Bean(org.springframework.context.annotation.Bean)

Example 10 with FAILED

use of com.sequenceiq.freeipa.api.v1.freeipa.user.model.SynchronizationStatus.FAILED in project cloudbreak by hortonworks.

the class FreeIpaUpscaleActions method validateInstancesAction.

@Bean(name = "UPSCALE_VALIDATE_INSTANCES_STATE")
public Action<?, ?> validateInstancesAction() {
    return new AbstractUpscaleAction<>(UpscaleStackResult.class) {

        @Override
        protected void doExecute(StackContext context, UpscaleStackResult payload, Map<Object, Object> variables) {
            Stack stack = context.getStack();
            stackUpdater.updateStackStatus(stack.getId(), getInProgressStatus(variables), "Validating new instances");
            try {
                finishAddInstances(context, payload);
                sendEvent(context, UPSCALE_VALIDATE_INSTANCES_FINISHED_EVENT.selector(), new StackEvent(stack.getId()));
            } catch (Exception e) {
                LOGGER.error("Failed to validate the instances", e);
                sendEvent(context, UPSCALE_VALIDATE_INSTANCES_FAILED_EVENT.selector(), new UpscaleFailureEvent(stack.getId(), "Validating new instances", Set.of(), Map.of(), e));
            }
        }

        private void finishAddInstances(StackContext context, UpscaleStackResult payload) {
            LOGGER.debug("Upscale stack result: {}", payload);
            List<CloudResourceStatus> results = payload.getResults();
            validateResourceResults(context, payload.getErrorDetails(), results);
            Set<Resource> resourceSet = transformResults(results, context.getStack());
            if (resourceSet.isEmpty()) {
                metadataSetupService.cleanupRequestedInstances(context.getStack());
                throw new OperationException("Failed to upscale the cluster since all create request failed. Resource set is empty");
            }
            LOGGER.debug("Adding new instances to the stack is DONE");
        }

        private void validateResourceResults(StackContext context, Exception exception, List<CloudResourceStatus> results) {
            if (exception != null) {
                LOGGER.info(format("Failed to upscale stack: %s", context.getCloudContext()), exception);
                throw new OperationException(exception);
            }
            List<CloudResourceStatus> missingResources = results.stream().filter(result -> CommonResourceType.TEMPLATE == result.getCloudResource().getType().getCommonResourceType()).filter(status -> status.isFailed() || status.isDeleted()).collect(Collectors.toList());
            if (!missingResources.isEmpty()) {
                StringBuilder message = new StringBuilder("Failed to upscale the stack for ").append(context.getCloudContext()).append(" due to: ");
                missingResources.forEach(res -> message.append("[privateId: ").append(res.getPrivateId()).append(", statusReason: ").append(res.getStatusReason()).append("] "));
                LOGGER.warn(message.toString());
                throw new OperationException(message.toString());
            }
        }

        private Set<Resource> transformResults(Iterable<CloudResourceStatus> cloudResourceStatuses, Stack stack) {
            Set<Resource> retSet = new HashSet<>();
            for (CloudResourceStatus cloudResourceStatus : cloudResourceStatuses) {
                if (!cloudResourceStatus.isFailed()) {
                    CloudResource cloudResource = cloudResourceStatus.getCloudResource();
                    Resource resource = new Resource(cloudResource.getType(), cloudResource.getName(), cloudResource.getReference(), cloudResource.getStatus(), stack, null, cloudResource.getAvailabilityZone());
                    retSet.add(resource);
                }
            }
            return retSet;
        }
    };
}
Also used : StringUtils(org.apache.commons.lang3.StringUtils) UpscaleFailureEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleFailureEvent) ThreadBasedUserCrnProvider(com.sequenceiq.cloudbreak.auth.ThreadBasedUserCrnProvider) Map(java.util.Map) UPSCALE_UPDATE_ENVIRONMENT_STACK_CONFIG_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_UPDATE_ENVIRONMENT_STACK_CONFIG_FINISHED_EVENT) CloudVmInstanceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudVmInstanceStatus) EnvironmentEndpoint(com.sequenceiq.environment.api.v1.environment.endpoint.EnvironmentEndpoint) PayloadConverter(com.sequenceiq.flow.core.PayloadConverter) UPSCALE_RECORD_HOSTNAMES_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_RECORD_HOSTNAMES_FINISHED_EVENT) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) FailureDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.FailureDetails) Set(java.util.Set) WebApplicationExceptionMessageExtractor(com.sequenceiq.cloudbreak.common.exception.WebApplicationExceptionMessageExtractor) AdjustmentType(com.sequenceiq.common.api.type.AdjustmentType) UPSCALE_UPDATE_ENVIRONMENT_STACK_CONFIG_FAILED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_UPDATE_ENVIRONMENT_STACK_CONFIG_FAILED_EVENT) ValidateCloudStorageRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.cloudstorage.ValidateCloudStorageRequest) Flow(com.sequenceiq.flow.core.Flow) CloudVmMetaDataStatus(com.sequenceiq.cloudbreak.cloud.model.CloudVmMetaDataStatus) KerberosConfigUpdateService(com.sequenceiq.freeipa.service.config.KerberosConfigUpdateService) InstanceGroupService(com.sequenceiq.freeipa.service.stack.instance.InstanceGroupService) UPSCALE_VALIDATE_INSTANCES_FAILED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_VALIDATE_INSTANCES_FAILED_EVENT) UPSCALE_UPDATE_KERBEROS_NAMESERVERS_CONFIG_FAILED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_UPDATE_KERBEROS_NAMESERVERS_CONFIG_FAILED_EVENT) ResourceLists(com.sequenceiq.cloudbreak.cloud.transform.ResourceLists) BootstrapMachinesRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.bootstrap.BootstrapMachinesRequest) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) UPSCALE_UPDATE_KERBEROS_NAMESERVERS_CONFIG_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_UPDATE_KERBEROS_NAMESERVERS_CONFIG_FINISHED_EVENT) UPSCALE_UPDATE_METADATA_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_UPDATE_METADATA_FINISHED_EVENT) ResourceToCloudResourceConverter(com.sequenceiq.freeipa.converter.cloud.ResourceToCloudResourceConverter) ArrayList(java.util.ArrayList) StateContext(org.springframework.statemachine.StateContext) InstanceMetaData(com.sequenceiq.freeipa.entity.InstanceMetaData) Stack(com.sequenceiq.freeipa.entity.Stack) StackEvent(com.sequenceiq.freeipa.flow.stack.StackEvent) ClusterProxyRegistrationSuccess(com.sequenceiq.freeipa.flow.stack.provision.event.clusterproxy.ClusterProxyRegistrationSuccess) CommonResourceType(com.sequenceiq.common.api.type.CommonResourceType) PostInstallFreeIpaRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.postinstall.PostInstallFreeIpaRequest) UPSCALE_SAVE_METADATA_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_SAVE_METADATA_FINISHED_EVENT) PostInstallFreeIpaSuccess(com.sequenceiq.freeipa.flow.freeipa.provision.event.postinstall.PostInstallFreeIpaSuccess) PostInstallFreeIpaFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.PostInstallFreeIpaFailedToUpscaleFailureEventConverter) InstanceStatus(com.sequenceiq.cloudbreak.cloud.model.InstanceStatus) StackToCloudStackConverter(com.sequenceiq.freeipa.converter.cloud.StackToCloudStackConverter) InstallFreeIpaServicesSuccess(com.sequenceiq.freeipa.flow.freeipa.provision.event.services.InstallFreeIpaServicesSuccess) SuccessDetails(com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails) Action(org.springframework.statemachine.action.Action) StackContext(com.sequenceiq.freeipa.flow.stack.StackContext) LoggerFactory(org.slf4j.LoggerFactory) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) ClientErrorException(javax.ws.rs.ClientErrorException) OrchestratorConfigRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.orchestrator.OrchestratorConfigRequest) ResourceService(com.sequenceiq.freeipa.service.resource.ResourceService) UpscaleStackRequest(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleStackRequest) UpscaleEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleEvent) UPSCALE_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_FINISHED_EVENT) HostMetadataSetupRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupRequest) CollectMetadataResultToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.CollectMetadataResultToUpscaleFailureEventConverter) ClusterProxyUpdateRegistrationRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.clusterproxy.ClusterProxyUpdateRegistrationRequest) UPSCALE_STARTING_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_STARTING_FINISHED_EVENT) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) InstanceMetaDataService(com.sequenceiq.freeipa.service.stack.instance.InstanceMetaDataService) TlsSetupService(com.sequenceiq.freeipa.service.TlsSetupService) FlowParameters(com.sequenceiq.flow.core.FlowParameters) ClusterProxyRegistrationRequest(com.sequenceiq.freeipa.flow.stack.provision.event.clusterproxy.ClusterProxyRegistrationRequest) UpscaleStackResultToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.UpscaleStackResultToUpscaleFailureEventConverter) InstallFreeIpaServicesRequest(com.sequenceiq.freeipa.flow.freeipa.provision.event.services.InstallFreeIpaServicesRequest) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) RegionAwareInternalCrnGeneratorFactory(com.sequenceiq.cloudbreak.auth.crn.RegionAwareInternalCrnGeneratorFactory) FAIL_HANDLED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.FAIL_HANDLED_EVENT) Objects(java.util.Objects) Configuration(org.springframework.context.annotation.Configuration) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) HostMetadataSetupFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.HostMetadataSetupFailedToUpscaleFailureEventConverter) StackUpdater(com.sequenceiq.freeipa.service.stack.StackUpdater) BootstrapMachinesFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.BootstrapMachinesFailedToUpscaleFailureEventConverter) UpscaleStackResult(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleStackResult) HashSet(java.util.HashSet) Inject(javax.inject.Inject) BootstrapMachinesSuccess(com.sequenceiq.freeipa.flow.freeipa.provision.event.bootstrap.BootstrapMachinesSuccess) InstallFreeIpaServicesFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.InstallFreeIpaServicesFailedToUpscaleFailureEventConverter) Resource(com.sequenceiq.freeipa.entity.Resource) Logger(org.slf4j.Logger) UpscaleFlowEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent) ValidateInstancesHealthEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.event.ValidateInstancesHealthEvent) CollectMetadataResult(com.sequenceiq.cloudbreak.cloud.event.instance.CollectMetadataResult) CollectMetadataRequest(com.sequenceiq.cloudbreak.cloud.event.instance.CollectMetadataRequest) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) AdjustmentTypeWithThreshold(com.sequenceiq.common.api.adjustment.AdjustmentTypeWithThreshold) ClusterProxyUpdateRegistrationSuccess(com.sequenceiq.freeipa.flow.freeipa.provision.event.clusterproxy.ClusterProxyUpdateRegistrationSuccess) ClusterProxyUpdateRegistrationFailedToUpscaleFailureEventConverter(com.sequenceiq.freeipa.flow.freeipa.upscale.failure.ClusterProxyUpdateRegistrationFailedToUpscaleFailureEventConverter) OperationService(com.sequenceiq.freeipa.service.operation.OperationService) OperationException(com.sequenceiq.cloudbreak.service.OperationException) MetadataSetupService(com.sequenceiq.freeipa.service.stack.instance.MetadataSetupService) InstanceGroup(com.sequenceiq.freeipa.entity.InstanceGroup) HostMetadataSetupSuccess(com.sequenceiq.freeipa.flow.freeipa.provision.event.hostmetadatasetup.HostMetadataSetupSuccess) UPSCALE_VALIDATE_INSTANCES_FINISHED_EVENT(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleFlowEvent.UPSCALE_VALIDATE_INSTANCES_FINISHED_EVENT) Bean(org.springframework.context.annotation.Bean) Collections(java.util.Collections) UpscaleState(com.sequenceiq.freeipa.flow.freeipa.upscale.UpscaleState) Resource(com.sequenceiq.freeipa.entity.Resource) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) ClientErrorException(javax.ws.rs.ClientErrorException) OperationException(com.sequenceiq.cloudbreak.service.OperationException) Stack(com.sequenceiq.freeipa.entity.Stack) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) UpscaleStackResult(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleStackResult) StackEvent(com.sequenceiq.freeipa.flow.stack.StackEvent) StackContext(com.sequenceiq.freeipa.flow.stack.StackContext) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) UpscaleFailureEvent(com.sequenceiq.freeipa.flow.freeipa.upscale.event.UpscaleFailureEvent) ArrayList(java.util.ArrayList) List(java.util.List) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Map(java.util.Map) OperationException(com.sequenceiq.cloudbreak.service.OperationException) HashSet(java.util.HashSet) Bean(org.springframework.context.annotation.Bean)

Aggregations

Stack (com.sequenceiq.freeipa.entity.Stack)12 WebApplicationException (javax.ws.rs.WebApplicationException)11 FailureDetails (com.sequenceiq.freeipa.api.v1.freeipa.user.model.FailureDetails)9 SuccessDetails (com.sequenceiq.freeipa.api.v1.freeipa.user.model.SuccessDetails)9 TestFailException (com.sequenceiq.it.cloudbreak.exception.TestFailException)9 ArrayList (java.util.ArrayList)8 List (java.util.List)8 Map (java.util.Map)7 OperationService (com.sequenceiq.freeipa.service.operation.OperationService)6 Bean (org.springframework.context.annotation.Bean)6 OperationStatus (com.sequenceiq.freeipa.api.v1.operation.model.OperationStatus)5 FreeIpaOperationFailedException (com.sequenceiq.environment.exception.FreeIpaOperationFailedException)4 FlowParameters (com.sequenceiq.flow.core.FlowParameters)4 SyncOperationStatus (com.sequenceiq.freeipa.api.v1.freeipa.user.model.SyncOperationStatus)4 StateContext (org.springframework.statemachine.StateContext)4 Flow (com.sequenceiq.flow.core.Flow)3 InstanceMetaData (com.sequenceiq.freeipa.entity.InstanceMetaData)3 StackContext (com.sequenceiq.freeipa.flow.stack.StackContext)3 Test (org.junit.jupiter.api.Test)3 ImageV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.imagecatalog.responses.ImageV4Response)2