Uploaded image for project: 'RHEL Conversions'
  1. RHEL Conversions
  2. RHELC-1677

yum makecache fails on Alma and Rocky 9

XMLWordPrintable

    • False
    • False
    • Hide

      None

      Show
      None
    • 3
    • Testable

      With system registered to the Satellite just to consume RHEL content and no other repositories (repofiles) present in the /etc/yum.repos.d/ dir the yum makecache call fails with Unknown repo: 'rhel-9-for-x86_64-baseos-rpms'

      [2024-08-02T11:48:10+0000] DEBUG - Calling command 'yum makecache --releasever=9.4 --setopt=*.skip_if_unavailable=False --setopt=module_platform_id=platform:el9 --disablerepo=* --enablerepo rhel-9-for-x86_64-baseos-rpms --enablerepo rhel-9-for-x86_64-appstream-rpms'
      ERROR - (ERROR) ENSURE_KERNEL_MODULES_COMPATIBILITY::PROBLEM_WITH_PACKAGE_REPO - Could not download package metadata
       Description: There was an error retrieving the package metadata to verify kernel modules are available in RHEL.
       Diagnosis: We were unable to download the repository metadata for (rhel-9-for-x86_64-baseos-rpms, rhel-9-for-x86_64-appstream-rpms) to determine packages containing kernel modules.  Can be caused by not enough disk space in /var/cache or too little memory.  The yum output below may have a clue for what went wrong in this case:
      
      Updating Subscription Management repositories.
      
      Error: Unknown repo: 'rhel-9-for-x86_64-baseos-rpms'
      

      Reproducer

      • register the system to the Satellite to consume only RHEL content
      • remove all repofiles
      • run convert2rhel --debug

      Minimal reproducer outside of the utility

      • register the system to the Satellite to consume only RHEL content
      • remove all repofiles
      • remove the respective <system>-release package
      • rpm -e --nodeps almalinux-release
      • run yum makecache trying to enable either of RHEL repositories
      • yum makecache --releasever=9.4 --setopt=*.skip_if_unavailable=False --setopt=module_platform_id=platform:el9 --disablerepo=* --enablerepo rhel-9-for-x86_64-baseos-rpms --enablerepo rhel-9-for-x86_64-appstream-rpms

      The issue is with the <system>-release package taking ownership of both /etc/yum.repos.d/ dir as whole and /etc/yum.repos.d/redhat.repo
      Removing the release package causes the whole dir to be erased, which prohibits subscription-manager to refresh the redhat.repo file.
      Therefore no repository definition can be found to be enabled.

      LOGS https://artifacts.osci.redhat.com/testing-farm/efd3b665-555e-4d90-a6ad-c0fa0715b9fb/work-non-destructiveao5xkn1r/plans/tier0/core/non-destructive/execute/data/guest/default-0/tests/integration/tier0/non-destructive/system-release-backup/os_release_restored/override_inhibitor_os_release_restored-32/output.txt

              ahosek@redhat.com Adam Hosek
              ddiblik@redhat.com Daniel Diblik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: