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

Yum Metadata not rebuilt after staging deletion of rpm

    XMLWordPrintable

    Details

      Description

      The Yum metadata is not rebuilt after an rpm is deleted i.e. the repo's filelists, primary and other xml files still reference the deleted rpm.

      To reproduce:

      1. Upload two components to a hosted yum repo.
      2. Tag one of those components with tag yum-test.
      3. Use staging delete API to delete component with tag yum-test.
      4. Wait 60 seconds for the rebuild of yum metadata:

        2019-12-04 12:53:28,954+0000 INFO  [event-7-thread-74] admin org.sonatype.nexus.repository.yum.internal.createrepo.CreateRepoFacetImpl - Scheduling rebuild of yum metadata to start in 60 seconds

        2019-12-04 12:54:29,175+0000 INFO  [event-7-thread-73] admin org.sonatype.nexus.repository.yum.internal.createrepo.CreateRepoFacetImpl - Finished rebuilding yum metadata for repository yum-hosted

      5. Browse tree shows one rpm, as expected.
      6. Download the primary.xml.gz and examine. I see two rpms, so the metadata is not updated.

       

      Expected:
      The deleted rpm should be removed from the yum metadata files.

      Actual:

      The deleted rpm is still showing in the yum metadata files

      Workaround:
      Run the 'Repair - Rebuild Yum repository metadata (repodata)' task against the affected repository.

       

      This is a little different from NEXUS-22031, where the filelists, primary and other xml files are missing. In this case the files are there, but the deleted components are incorrectly referenced in the yum metadata.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              KWright Kristofer Wright [X] (Inactive)
              Reporter:
              msurani Mahendra Surani
              CC:
              Anders Hammar
              Last Updated By:
              Wes Wannemacher
              Team:
              NXRM - Neo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title

                    PagerDuty