Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-19014

Conan migration will fail in case files are already in the target path

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: 2 - Critical
    • Resolution: Done
    • Affects Version/s: 6.9.0, 6.9.1
    • Fix Version/s: 6.10.1
    • Component/s: Conan
    • Labels:
      None
    • Severity:
      Critical

      Description

      Environment:

      We have two Artifactory instances: A and B:

      Artifactory A - Installed with version < 6.9
      Artifactory B - Installed with version < 6.9

      *Steps to reproduce: *

      1. Configure a push replication with event base to sync properties between Artifactory A ---> B. (only sync properties, do not add sync delete)

      2. Add Conan packages to Artifactory A and make sure the event base replication is working as expected and content is being replicated to Artifactory B.

      3. Upgrade Artifactory A to version 6.9 or above and make sure the Conan migration is finished successfully.
      Part of the migration process is to change the path of the artifacts and therfore, the path will be also changed on Artifactory B.

      4. Upgrade Artifactory B to version 6.9 or above and you will experience issues with Conan migration with the following error:

      package: conan-local:yonatanb/testPkg/1.7.0-test/testing/export/conanfile.py error: org.artifactory.addon.conan.migration.ConanV2CalculationFatalException: Failed to move 'conan-local:yonatanb/testPkg/1.7.0-test/testing/export' to 'conan-local:yonatanb/testPkg/1.7.0-test/testing/0/export': Target at 'conan-local:yonatanb/testPkg/1.7.0-test/testing/0/export' already exists
      

      It seems, that the file in Artifactory B has already been updated with the new path according to the replication, however, it was not triggered by the migration which triggers the errors.

      It seems there are two workarounds for this issue:

      1. Add the following system property to disable the migration for this Artifactory instance by adding the below system property to $ARTIFACTORY_HOME/etc/artifactory.system.properties:

      artifactory.conan.v2.migration.job.enabled=false
      

      After adding the above you will need to restart Artifactory B.

      2. Back up your conan-repository by doing the following:

      • Stop replications from Artifactory A to B
      • Create a new Generic repository in Artifactory B
      • Move the content from the conan repository to the generic repository
      • Restart Artifactory B and wait for migration to finish
      • Activate replications from Artifactory A to B
      • Make sure all content has being replicated
      • Delete the generic repository and its content

        Attachments

          Activity

            People

            Assignee:
            yuvalr Yuval Reches (Inactive)
            Reporter:
            yonatanb Yonatan Brand
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Sync Status

                Connection: RTFACT Sync
                RTMID-19014 -
                SYNCHRONIZED
                • Last Sync Date: