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

Leapp cannot upgrade fully offline with an ISO if the machine was registered

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

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • None
    • rhel-8.10
    • leapp-repository
    • None
    • None
    • Low
    • rhel-upgrades
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • All
    • None

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

      Our customer installed their machines online, with the RHSM backend using CDN repos (via a proxy, but that does not matter here). Once done, they put them in a datacenter with no connection to the internet (no DNS, no proxy). After that, they are not able to upgrade with an ISO.

      What is the impact of this issue to you?

      Cannot IPU fully offline

      Please provide the package NVR for which the bug is seen:

      leapp-upgrade-el8toel9-0.22.0-1.el8_10

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Set dns=none under the [main] section from /etc/NetworkManager/NetworkManager.conf
      2. echo > /etc/resolv.conf to empty the NS already defined
      3. systemctl restart NetworkManager
      4. leapp upgrade --no-rhsm --target 9.6 --iso /srv/rhel-9.6-x86_64-dvd.iso

      Expected results

      Works fully offline when upgrading with an ISO

      Actual results

      ====> * get_enabled_modules
              Provides data about which module streams are enabled on the source system.
      Process Process-286:
      Traceback (most recent call last):
        File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 573, in load
          ret = self._repo.load()
        File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 397, in load
          return _repo.Repo_load(self)
      libdnf._error.Error: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried 

      Workarounds

      1. Initially suggested to execute `subscription-manager clean` and removing repos defined under /etc/yum.repos.d, but our customer wanted to keep the subscription-manager data.

      2. Also suggested to comment out `base.read_all_repos()` from `/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/module.py`. To me, both `get_enabled_modules()` and the `rpm_scanner` actor work well without reading the repos. But as I was not sure of the impact AND such a code change being not supported by Red Hat, they didn't want to try this approach, which is understandable.

      3. I finally suggested the following approach to avoid the drawbacks from the other solutions. Removing the content of /etc/yum.repos.d/* and creating an empty redhat.repo with an immutable bit (to prevent subscription-manager/rhsmcertd to update it). It works for me and the customer didn't share any feedback for now.

              leapp-notifications leapp-notifications
              rhn-support-cbesson Christophe Besson
              leapp-notifications leapp-notifications
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: