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

Rebuilding yum metadata generates the -filelists.xml.gz with less RPM files

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.32.0
    • Fix Version/s: None
    • Component/s: Scheduled Tasks, Yum
    • Labels:
    • Notability:
      2

      Description

      SYMPTOM:

      Similar to NEXUS-28166 (but not same) sometimes rebuilding yum metadata generates unexpectedly smaller filelists.xml.gz file, which doesn't contain expected RPM files so that yum install fails on the client PCs.

      FROM LOG FILES:

      NOTE: the metadata of the repository "yum-releases-prd" was rebuilt hourly.

      The request.log shows good sizes until around 09:30, then after rebuilding the metadata by the thread ID: event-20-thread-130817, the file size became almost half, then fixed automatically from around 17:44:

      $ rg '2021:([^ ]+).+ /repository/yum-releases-prd/.+filelists.xml.gz HTTP/1.1" 200 - (\d+)' -o -r '$1 $2' ./log/request.log
      00:05:12 380242
      ... (many requests which show same size as above) ...
      09:35:00 380242
      09:50:20 171030    <<< from this time, size is too small.
      ... (many requests which show almost same size as above) ...
      17:22:40 171072
      17:44:30 380346
      

      When the rebuild ran, it knew the rpmCount is 621:

      2021-11-03 09:30:09,705+0000 DEBUG [event-20-thread-130817]  *SYSTEM org.sonatype.nexus.repository.yum.orient.internal.createrepo.OrientCreateRepoServiceImpl - Repo depth 0, using name=, rpmCount=621, useCache=false, rpmsRemoved=false, files=[type=FILELISTS, path=../sonatype-work/nexus3/tmp/filelists4507919469655251278xml.gz, type=PRIMARY, path=../sonatype-work/nexus3/tmp/primary5591402448091574848xml.gz, type=OTHER, path=../sonatype-work/nexus3/tmp/other8669147978362659632xml.gz, type=REPOMD, path=../sonatype-work/nexus3/tmp/repomd2829309958356378899xml]
      

      But counting 'Adding RPM' shows much less number than other threads' counts:

      $ rg -c 'Adding RPM' event-20-thread-130124_good.log
      621
      $ rg -c 'Adding RPM' event-20-thread-130817_bad.log
      137
      $ rg -c 'Adding RPM' event-20-thread-134568_good2.log
      622
      

      REPRODUCE STEPS:

      Can't reproduce internally. Also it does not seem to happen frequently on customer's environment, but can last for hours. However certain features are in use where this was occurring:

      • customer has scheduled regular ( every 60 minutes) tasks to manually rebuild the yum metadata for the affected repo - one of these tasks truncated the filelists file
      • staging/move operations are being used while running 3.32.0 instance ( NEXUS-28166 still in play )

      EXPECTED BEHAVIOUR:

      • The rebuilding yum metadata task should be more robust (shouldn't generate significantly different size files)
      • At least it should provide more logging information when it didn't add the expected number.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              hosako Hajime Osako
              Last Updated By:
              Peter Lynch Peter Lynch
              Team:
              NXRM - Mad Max
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title