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

convert2rhel fails due to unexpected exception in packaging, due to missing package on the system

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • rhel-8.8.0
    • convert2rhel
    • None
    • Low
    • rhel-sst-conversions
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:

      We have a customer converting from CentOS 8.5 to RHEL 8.5. The conversion fails with a backtrace:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      (ERROR) PACKAGE_UPDATES.UNEXPECTED_ERROR: Unhandled exception was caught: in method 'ConfigParser_setSubstitutions', argument 2 of type 'std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string
      const,std::string > > > const &'
      Please file a bug at https://issues.redhat.com/ to have this fixed or a specific error message added.
      Traceback: Traceback (most recent call last):
      File "/usr/lib/python3.6/site-
      packages/convert2rhel/actions/_init_.py", line 393, in run
      action.run()
      File "/usr/lib/python3.6/site-packages/convert2rhel/actions/system_checks/package_updates.py", line 51, in run
      packages_to_update =
      get_total_packages_to_update(reposdir=reposdir)
      File "/usr/lib/python3.6/site-packages/convert2rhel/utils.py", line 245, in wrapper
      raise process.exception
      TypeError: in method 'ConfigParser_setSubstitutions', argument 2 of type
      'std::map< std::string,std::string,std::less< std::string >,std::allocator< std::pair< std::string const,std::string > > > const &'
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      The reason for that was "system-release" provided by `centos-linux-release` package was not installed on the system.
      We could see this in `rpm -Va` output:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      Unsatisfied dependencies for setup-2.12.2-6.el8.noarch:
      system-release is needed by (installed) setup-2.12.2-6.el8.noarch
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Installing the package fixed the issue, still I would recommend we harden convert2rhel code a bit more to handle such issues, e.g. report a message such as "Check rpm -Va output for any issues".

      Version-Release number of selected component (if applicable):

      convert2rhel-1.3.1-1.el8.noarch

      How reproducible:

      Always

      Steps to Reproduce:
      1. Forcibly remove "centos-linux-release" using "rpm -e centos-linux-release --nodeps" command
      2. Execute convert2rhel

      Actual results:

      Backtrace above

      Expected results:

      Some better message

              mbocek@redhat.com Michal Bocek
              rhn-support-rmetrich Renaud Métrich
              RH Bugzilla Integration RH Bugzilla Integration
              Miriam Portman Miriam Portman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: