Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-15745

Yum proxy is not able to remove absolute URLs for metadata files that aren't at the root of a repository.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.8.0
    • Fix Version/s: 3.10.0
    • Component/s: Yum
    • Labels:
      None
    • Story Points:
      2

      Description

      When repomd.xml is fetched through a yum proxy then Nexus automatically fetches the primary.xml.gz file so that it can remove any absolute urls, and update the checksum and size attributes that are stored in repomd.xml.

      This works fine when the metadata is at the root of the repository. (i.e. remote url of http://mirror.centos.org/centos/7/os/x86_64 and a request url of http://localhost:8081/repository/yum-proxy/repodata/repomd.xml).

      It fails when metadata is not at the root because it uses the path directly from the repomd.xml.

      1. Create a yum proxy repository with remote url http://mirror.centos.org/centos
      2. Fetch repomd.xml via http://localhost:8081/repository/yum-proxy/7/os/x86_64/repodata/repomd.xml
      3. The following message will be logged

      2018-01-30 10:53:43,834-0400 WARN [qtp732641399-75] admin org.sonatype.nexus.repository.yum.internal.proxy.YumProxyFacetImpl - Failed to fetch metadata file for path repodata/b686d3a0f337323e656d9387b9a76ce6808b26255fc3a138b1a87d3b1cb95ed5-primary.xml.gz and repository yum-proxy-97. Received status code 404

      To fix this we need to prepend the /7/os/x86_64 part of the request url onto the url that is extracted from repomd.xml

        Attachments

          Activity

            People

            Assignee:
            jstephens Joseph Stephens
            Reporter:
            jstephens Joseph Stephens
            Last Updated By:
            Peter Lynch
            Team:
            Nexus - Formats
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title