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

Yum .xz compressed metadata will fail a virtual Yum's repository merge

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.6.1
    • Fix Version/s: None
    • Component/s: Virtual Repositories, YUM
    • Labels:
      None
    • Severity:
      Medium

      Description

      Workaround:

      Simply remove any remote which fetches .xz Yum compressed metadata files from an aggregating virtual repo.

      Steps to reproduce:

      1. Setup a local, remote & virtual RPM repositories.
      2. Deploy any valid .RPM file to the local repository.
      3. The remote repository has to be to:
      https://nvidia.github.io/nvidia-docker/centos7/x86_64
      4. Configure a YUM client to work against the virtual repository contains both above.
      5. Do a "Yum update" from the yum client against the virtual repository.
      6. Clean the Cache-FS.
      7. Recalculate the metadata of the virtual RPM repository using:
      curl -XPOST -uadmin:password1 "localhost:8082/artifactory/api/yum/rpm?async=0"
      8. You should encounter this error in the logs:

      2020-06-30T15:55:59.360Z [jfrt ] [ERROR] [ca9c136d7fdbddf2] [.i.YumVirtualCalculatorImpl:85] [art-exec-7          ] - error writing yum virtual metadata for 'centos7-rpm-external/repodata/'
      java.io.IOException: java.io.IOException: Error during merge of index: nvidia-rpm-docker-remote-cache/repodata/73204fb442071edfb26e5c051e38582c96e45d30418a9609b1249a5099405cbe66e18225f33c7626c8fec16c68e3fde7d9679689d6e130a13af61d9482d0c25a-primary.xml.xz: Given input stream could not be recognized as an archive stream
      	at org.iostreams.streams.in.OutputToInputStream.checkForException(OutputToInputStream.java:170)
      	at org.iostreams.streams.in.OutputToInputStream.read(OutputToInputStream.java:100)
      	at java.base/java.io.InputStream.read(InputStream.java:205)
      	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2314)
      	at org.apache.commons.io.IOUtils.copy(IOUtils.java:2270)
      	at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:2291)
      	at org.artifactory.addon.yum.virtual.index.YumVirtualRepoMetadataWriter.writeMergedIndexToFileSystem(YumVirtualRepoMetadataWriter.java:161)
      	at org.artifactory.addon.yum.virtual.index.YumVirtualRepoMetadataWriter.writeMetadata(YumVirtualRepoMetadataWriter.java:100)
      	at org.artifactory.addon.yum.virtual.index.YumVirtualCalculatorImpl.writeYumVirtualMetadata(YumVirtualCalculatorImpl.java:82)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at 
      

        Attachments

          Issue Links

            Activity

                People

                Assignee:
                Unassigned
                Reporter:
                andreik Andrei Komarov
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated: