Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-28512

After Leapp Upgrade RHEL8 System Still Tries to Use 7Server For Repositories

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • None
    • Low
    • rhel-upgrades
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      After upgrading a RHEL7 system to RHEL8 via leapp, the RHEL8 system will still try to use 7Server when using the dnf command.

      Prior to the leapp upgrade, the "releasever" was set to "7Server" in "/etc/yum/vars/releasever".

      After the upgrade the only sign of 7Server occurs in both:

      ~~~
      /etc/yum.repos.d/redhat.redpo
      /var/lib/rhsm/repo_server_val/redhat.repo
      ~~~

      Otherwise, if we check subscription-manager or the new releasever, we see it is set as "8.9":

      ~~~

      1. cat /etc/yum/vars/releasever
        8.9
      1. cat /etc/dnf/vars/releasever
        8.9
      1. subscription-manager release --show
        Release: 8.9
        ~~~

      Yet, when we run "dnf repolist -v" we get this error:

      ~~~

      1. dnf repolist -v
        Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, product-id, repoclosure, repodiff, repograph, repomanage, reposync, subscription-manager, system-upgrade, uploadprofile
        Updating Subscription Management repositories.
        DNF version: 4.7.0
        cachedir: /var/cache/dnf
        Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 618 B/s | 367 B 00:00
        Errors during downloading metadata for repository 'rhel-8-for-x86_64-baseos-rpms':

      How reproducible:

      Always

      Steps to reproduce

      1. set /etc/yum/vars/releasever file to contain "7Server"
      2. perform leapp upgrade, and reboot server
      3. once RHEL8 is up and running, try and run "dnf repolist -v"

      Expected results

      Expect that dnf would be successful, and 7Server would not be used

      Actual results

      403 error is returned from CDN because 7Server doesn't exist in a RHEL8 repository url pathway

      Additional Comments:

      I found running "subscription-manager refresh" was enough to fix this issue. It would be nice to have this run, or some equivalent like (subscription-manager release --unset) after the reboot.

      Also, we see there is just some strange returns from the "subscription-manager" command (only release --show seems to print correctly):

      ~~~

      1. subscription-manager release --show
        Release: 8.9
      1. subscription-manager release --set 8.9
        No releases match '8.9'. Consult 'release --list' for a full listing.
      1. subscription-manager release --set 8
        No releases match '8'. Consult 'release --list' for a full listing.
      1. subscription-manager release --list
        No release versions available, please check subscriptions.
        ~~~

      Sub Man version:

      ~~~

      1. subscription-manager version
        server type: Red Hat Subscription Management
        subscription management server: 4.4.1-3
        subscription management rules: 5.44
        subscription-manager: 1.28.40-1.el8_9
        ~~~

              leapp-notifications leapp-notifications
              rhn-support-myoder Michael Yoder
              leapp-notifications leapp-notifications
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Miriam Portman Miriam Portman
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: