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

Incomplete rollback: katello package is not removed

XMLWordPrintable

    • False
    • False
    • Hide

      None

      Show
      None
    • 5
    • Testable

      What were you trying to do that didn't work?
      I want to convert CentOS 7 to RHEL using repos hosted on Satellite. I am following steps from Chapter 4. Converting using the command-line [0].

      I install gpgkey & convert2rhel as instructed in the docs. I download katello-ca-consumer package from Satellite and save it to /usr/share/convert2rhel/subscription-manager/ directory.

      I add org & activation_key details to "/etc/convert2rhel.ini":

      # cat /etc/convert2rhel.ini
      ~
      [subscription_manager]
      #username = admin
      #password = redhat
      activation_key = convert_to_7
      org = Default_Organization
      ~

      The first time i run `convert2rhel analyze` everything is ok.

      The second time I run it I hit “org not found” error such as:
      ~
      ========== Error (Must fix before conversion) ==========
      (ERROR) SUBSCRIBE_SYSTEM::FAILED_TO_SUBSCRIBE_SYSTEM - Failed to subscribe system.
      Description: After several attempts, convert2rhel was unable to subscribe the system using subscription-manager. This issue might occur because of but
      not limited to DBus, file permission-related issues, bad credentials, or network issues.
      Diagnosis: System registration failed with error com.redhat.RHSM1.Error:

      {"exception": "RestlibException", "message": "Organization Default_Organization does not exist.", "severity": "error"}

      .
      Remediation: N/A
      ~

      The root cause is that '/etc/rhsm/rhsm.conf' is missing after the script finishes. It doesn’t matter whether the pre-analysis finds any errors or not. After each run, rhsm.conf is deleted.

      The workaround is to either re-install the katello-ca-consumer package manually or to recreate rhsm.conf after each run:

      # cp /etc/rhsm/rhsm.conf.rpmsave /etc/rhsm/rhsm.conf

      Both workarounds are only temporary. If I re-run the script again then I will hit the "org not found" error once again.

      Every Satellite customer who runs `convert2rhel analyze` more than once will hit this.

      Let me know if you need access to reproducer.

      Please provide the package NVR for which bug is seen:
      convert2rhel-1.5.0-2.el7.noarch

      How reproducible:
      Reliably.

      Steps to reproduce:
      See problem description.

      Expected results:
      The pre-conversion analysis finishes successfully.

      Actual results:
      Pre-conversion analysis fails on subscription-manager registration even though I provide correct credentials.

      [0] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/converting_from_an_rpm-based_linux_distribution_to_rhel/converting-using-the-command-line_converting-from-a-linux-distribution-to-rhel#proc_preparing-for-a-rhel-conversion_converting-using-the-command-line

        1. second_run.txt
          45 kB
        2. first_run.txt
          75 kB

              Unassigned Unassigned
              rhn-support-jsenkyri Jan Senkyrik
              no-user-match-found no-user-match-found
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: