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

RPM Primary.xml metadata calculation incorrect if cache-fs and rpmcache is empty

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 5.4.4, 5.8.1
    • Fix Version/s: 5.9.0
    • Component/s: None
    • Labels:
      None

      Description

      For a cache-fs filestore, the primary.xml metadata for an artifact has incorrect rpm:header-range end value if you delete the artifact from the cache and the rpm cache. This is easily reproduced on a standalone instance, but needs to be tested for HA as well (for different combinations of cleared caches on different nodes)

      Steps to reproduce:
      -pulled the docker container docker.bintray.io/jfrog/artifactory-pro:latest
      -use default derby db, and the following binarystore.xml:
      <config version="v1">

      <chain>

      <provider type="cache-fs" id="cache-fs">

      <provider type="eventual" id="eventual">

      <provider type="retry" id="retry">

      <provider type="s3" id="s3"/>

      </provider>

      </provider>

      </provider>

      </chain>

      <provider type="cache-fs" id="cache-fs">

      <maxCacheSize>9000000000</maxCacheSize>

      <cacheProviderDir>/mnt/cache/filestore</cacheProviderDir>

      </provider>

      <provider type="eventual" id="eventual"/>

      <numberOfThreads>40</numberOfThreads>

      <provider type="retry" id="retry"/>

      <provider type="s3" id="s3">

      <bucketName>VALID_BUCKET_NAME</bucketName>

      <endpoint>VALID_ENDPOINT</endpoint>

      <credential>VALID_CREDENTIALS</credential>

      <identity>VALID_IDENTITY</identity>

      </provider>

      </config>
      -Create a RPM repo that auto calculates metadata named rpm-local.
      Deploy an artifact (i used 389-ds-base-1.3.5.10-11.el7.x86_64.rpm). The repodata automatically calculates, and it calculates correctly.
      -Now manually clear out any local cache related to the RPM:
      rm /mnt/cache/filestore/81/81df3d0926eeae57f951c04b4a45cf924c57e421
      rm /var/opt/jfrog/artifactory/data/.rpmcache/rpm-local/389-ds-base-1.3.5.10-11.el7.x86_64.rpm

      -And Force the repo to recalculate metadata through the UI (right click, recalculate index).
      When the artifact doesn’t exist in the cache-fs cache (/mnt/cache/filestore) AND .rpmcache, the header end calculated was 3634365, which is greater than the size of the package 1772792. See primary.xml.gz attached.
      -Afterwards, even if the file is cached after being downloaded again and the repo reindexed, metadata is still incorrect

      Workaround:
      -Seems like the workaround must be to redeploy the artifact and reindex

        Attachments

          Activity

            People

            • Assignee:
              danf Dan Feldman
              Reporter:
              mattheww Matthew Wang
              Assigned QA:
              Konstantin Shenderov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: