Bug 2216934 - convert2rhel fails due to unexpected exception in packaging, due to missing package on the system
Summary: convert2rhel fails due to unexpected exception in packaging, due to missing p...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: convert2rhel
Version: 8.8
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Michal Bocek
QA Contact: upgrades-and-conversions
Miriam Portman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-23 10:10 UTC by Renaud Métrich
Modified: 2023-07-31 07:08 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELC-1057 0 None None None 2023-06-23 10:11:24 UTC
Red Hat Issue Tracker RHELPLAN-160548 0 None None None 2023-06-23 10:11:26 UTC

Description Renaud Métrich 2023-06-23 10:10:48 UTC
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


Note You need to log in before you can comment on or make changes to this bug.