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

Inconsistent state of YUM metadata files in YUM proxy repository

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Not A Bug
    • Affects Version/s: 3.13.0
    • Fix Version/s: None
    • Component/s: Yum
    • Labels:

      Description

       

      Version

      Sonatype Nexus Repository OSS 3.13.0-01

      Component

      YUM proxy repository. The proxied remote YUM repository was Centos 7 Base (http://mirror.centos.org/centos/7/os/x86_64/), however in order to simplify reproducible scenario attached steps use simple HTTP server as remote YUM repository.  

      Description

      We encountered scenario leading to inconsistent state of metadata files of proxied YUM repository (I mean files stored in repodata directory, like repomd.xml, *primary.xml.gz, *filelists.xml.gz and so on). The inconsistency of YUM metadata files makes YUM to raise an error like:
       

      http:/some_server/repository/test/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum

       

      On the whole, a following situation is possible:

      1. All metadata yum files are consistent and all of them expired in Nexus proxy.
      2. YUM client requests to Nexus YUM proxy for only part of metadata files. Then, Nexus will update only part of metadata files. Let's assume that remote server didn't changed any data so metadata files are still consistent.
      3. All metadata yum files are consistent, however only part of them is update (didn't expired)
      4. All metadata was changed on YUM remote repository
      5. YUM client requests for all metadata files, some part of them won't be updated as they are not expired.
      6. Metadata yum files on YUM proxy repository are not consistent.

      Reproducible steps

       
      [user@localhost ~]$ python -m SimpleHTTPServer 12345 & 
      [user@localhost ~]$ mkdir repo 
      [user@localhost ~]$ # add some RPMs to repo/ directory
      [user@localhost ~]$ createrepo  --simple-md-filenames repo
      [user@localhost ~]$ #add yum-proxy repository to nexus and register it as "test" in local yum 
      [user@localhost ~]$ sudo rm -rf /var/cache/yum
      [user@localhost ~]$ sudo yum install --disablerepo=* --enablerepo=test fakepackagename
      Loaded plugins: fastestmirror 
      Determining fastest mirrors 
      test | 1.3 kB  00:00:00 
      test/primary |  841 B  00:00:00 
      test 5/5 
      No package fakepackagename available. 
      Error: Nothing to do 
      [user@localhost ~]$  add  some more RPMs to repo/ directory
      [user@localhost ~]$  createrepo  --simple-md-filenames repo 
      [user@localhost ~]$  yum install --disabler=* --enabler=*test /fakepackagefilepath 
      Loaded plugins: fastestmirror 
      Loading mirror speeds from cached hostfile 
      test/filelists |  313 B  00:00:00 
      http://some_server/repository/test/repodata/filelists.xml.gz: [Errno -1] Metadata file does not match checksum 
      Trying other mirror. 
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            kondziolka9ld kondziolka9ld
            Last Updated By:
            Peter Lynch Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title