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

Cloud to Cloud site import mail fail due to 'GroupAttribute' entries in entities.xml file

    XMLWordPrintable

Details

    Description

      Problem Definition

      When first importing users with the help of Atlassian support, the subsequent portion of data (without users, groups, and group memberships), will cause the import to fail due to the 'GroupAttribute' entries present in the entities.xml file.

      Suggested Solution

      Improve the error message on the UI so that users can identify this problem better.

      Notes

      Stack trace:

      com.atlassian.crowd.exception.runtime.OperationFailedException: Sync Failed
      	at com.atlassian.crowd.embedded.core.CrowdDirectoryServiceImpl.synchroniseDirectory(CrowdDirectoryServiceImpl.java:80)
      	at com.atlassian.crowd.embedded.core.CrowdServiceProxy.synchroniseDirectory(CrowdServiceProxy.java:86)
      	at com.atlassian.jira.bc.dataimport.identity.IdentityImportHelper.performMigration(IdentityImportHelper.java:154)
      	at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.performTasksOnImportDb(CloudImportTaskRunner.java:514)
      	at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.performTasksOnImportDb(CloudImportTaskRunner.java:631)
      	at com.atlassian.jira.bc.dataimport.CloudImportTaskRunner.lambda$null$1(CloudImportTaskRunner.java:261)
      	at com.atlassian.connpool.impl.AbstractConnectionPoolProvider.withPrivatePool(AbstractConnectionPoolProvider.java:145)
      	at com.atlassian.jira.connpool.JiraViburConnectionPoolProvider.withPrivatePool(JiraViburConnectionPoolProvider.java:155)
      	at com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$null$0(AbstractBackupTaskRunner.java:63)
      	at java.util.Optional.map(Optional.java:215)
      	at com.atlassian.jira.bc.dataimport.AbstractBackupTaskRunner.lambda$runWithSeparateContextAsync$1(AbstractBackupTaskRunner.java:62)
      	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: com.querydsl.core.QueryException: Caught BatchUpdateException for insert into "public"."cwd_group_attributes" ("directory_id", "group_id", "lower_attribute_value", "attribute_name", "attribute_value")
      values (?, ?, ?, ?, ?)

      Workaround

      We should include the SED commands that are usually used by this approach with the one to remove the group attributes from the entities.xml file. The list below has all the commands that should be used for this type of situation.

      MacOS
      sed -i '' '/<User id="/d' entities.xml

      sed -i '' '/<Group id="/d' entities.xml

      sed -i '' '/<Membership id="/d' entities.xml

      sed -i '' '/<GroupAttribute id="/d' entities.xml
      
      Linux
      sed -i '/<User id="/d' entities.xml

      sed -i '/<Group id="/d' entities.xml

      sed -i '/<Membership id="/d' entities.xml

      sed -i '/<GroupAttribute id="/d' entities.xml
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              fbeck Fábio W. [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: