Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-67932

Import fails because not all users can be created due to license exceeded

    XMLWordPrintable

Details

    Description

      Presents as a failed import.

      The stack trace in the logs will look something like:

      com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper$WrappingCrowdException: com.atlassian.crowd.exception.runtime.OperationFailedException
      	at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.transferUsersToCrowd(UsersAndGroupsImportHelper.java:211)
      	at com.atlassian.jira.bc.dataimport.identity.IdentityImportHelper.performMigration(IdentityImportHelper.java:111)
      	at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.performTasksOnImportDb(CloudImportTaskRunner.java:308)
      	at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.lambda$null$2(CloudImportTaskRunner.java:157)
      	at com.atlassian.connpool.impl.AbstractConnectionPoolProvider.withPrivatePool(AbstractConnectionPoolProvider.java:134)
      	at com.atlassian.jira.connpool.JiraViburConnectionPoolProvider.withPrivatePool(JiraViburConnectionPoolProvider.java:101)
      	at com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$null$0(AbstractBackupTaskRunner.java:60)
      	at java.util.Optional.map(Optional.java:215)
      	at com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$runWithSeparateContextAsync$1(AbstractBackupTaskRunner.java:59)
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.atlassian.crowd.exception.runtime.OperationFailedException
      	at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.withRetry(DefaultIdpSafeOperations.java:139)
      	at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.importUser(DefaultIdpSafeOperations.java:122)
      	at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.createNewUserWithGroupMemberships(UsersAndGroupsImportHelper.java:241)
      	at com.atlassian.jira.bc.dataimport.identity.UsersAndGroupsImportHelper.transferUsersToCrowd(UsersAndGroupsImportHelper.java:199)
      	... 12 more
      Caused by: com.atlassian.idp.client.exceptions.LicenceExceededException: {"schemas":["urn:ietf:params:scim:api:messages:2.0:Error"],"status":"400","detail":"Unable to create the user as you have insufficient licence seats for Jira Software","errorType":"LicenceExceeded","message":"Unable to create the user as you have insufficient licence seats for Jira Software","data":"Jira Software"}
      	at com.atlassian.idp.client.IdentityPlatformClientImpl.mapStatusCodeException(IdentityPlatformClientImpl.java:590)
      	at com.atlassian.idp.client.IdentityPlatformClientImpl.mapInputStream(IdentityPlatformClientImpl.java:523)
      	at com.atlassian.idp.client.IdentityPlatformClientImpl.makeRequestWithEntityBody(IdentityPlatformClientImpl.java:508)
      	at com.atlassian.idp.client.IdentityPlatformClientImpl.importUser(IdentityPlatformClientImpl.java:391)
      	at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.lambda$importUser$2(DefaultIdpSafeOperations.java:122)
      	at com.atlassian.jira.util.retry.Retryer$Retriable.call(Retryer.java:80)
      	at com.atlassian.jira.bc.dataimport.identity.DefaultIdpSafeOperations.withRetry(DefaultIdpSafeOperations.java:132)
      	... 15 more
      

      This occurs when the customer is on a fixed-seat license and they try to import more users than they have seats for. The easiest workaround is to remove inactive users from the import file. (their <User> xml element will have active="0" in that line - just delete the line. If it still fails then more users will have to be deleted.

      This is really strange and shouldn't be happening so I think there might be a bug somewhere with how we clear out the old users - maybe we're doing it later than we should, or maybe we need to wait for IDP's eventual consistency to clear up before we start creating users.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              edalgliesh Eric Dalgliesh
              Votes:
              4 Vote for this issue
              Watchers:
              17 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: