-
Bug
-
Resolution: Done-Errata
-
Blocker
-
None
-
None
-
False
-
False
-
-
5
-
2022-Q4
-
Testable
Reproducer:
- Get CentOS Linux 8.5
- Install subscription-manager
- Run convert2rhel and stop the conversion after the removal of the centos-linux-release package but before the PONR
- (The rollback functionality tries to re-install both the removed subscription-manager* and centos-linux-release packages but fails)
- The outcome is that because the centos-linux-release is not installed, dnf is unable to expand the $releasever variable so:
- any subsequent yum call fails
- another convert2rhel call tracebacks on a dnf API request related to checking whether the system is up to date
## First convert2rhel run 02:40:59 out: Upon continuing, we will uninstall the following subscription-manager/katello-ca-consumer packages: 02:40:59 out: 02:40:59 out: Package Vendor/Packager Repository 02:40:59 out: ------- --------------- ---------- 02:40:59 out: dnf-plugin-subscription-manager-1.28.21-3.el8.x86_64 CentOS @baseos 02:40:59 out: python3-subscription-manager-rhsm-1.28.21-3.el8.x86_64 CentOS @baseos 02:40:59 out: subscription-manager-1.28.21-3.el8.x86_64 CentOS @baseos 02:40:59 out: subscription-manager-rhsm-certificates-1.28.21-3.el8.x86_64 CentOS @baseos ... 02:41:58 out: Installing: 02:41:58 out: dnf-plugin-subscription-manager x86_64 1.28.29-3.el8 @commandline 311 k 02:41:58 out: python3-subscription-manager-rhsm x86_64 1.28.29-3.el8 @commandline 388 k 02:41:58 out: subscription-manager x86_64 1.28.29-3.el8 @commandline 1.2 M 02:41:58 out: subscription-manager-rhsm-certificates x86_64 1.28.29-3.el8 @commandline 284 k 02:41:58 out: Upgrading: 02:41:58 out: python3-cloud-what x86_64 1.28.29-3.el8 @commandline 310 k 02:41:58 out: python3-syspurpose x86_64 1.28.29-3.el8 @commandline 327 k ... 02:42:01 out: [10/15/2022 02:42:01] DEBUG - Skipping tracking previously installed package: python3-syspurpose 02:42:01 out: [10/15/2022 02:42:01] DEBUG - Skipping tracking previously installed package: python3-cloud-what 02:42:01 out: [10/15/2022 02:42:01] DEBUG - Skipping tracking previously installed package: json-c 02:42:01 out: [10/15/2022 02:42:01] DEBUG - Tracking installed packages: ['subscription-manager', 'subscription-manager-rhsm-certificates', 'python3-subscription-manager-rhsm', 'dnf-plugin-subscription-manager'] ... [11/03/2022 15:27:51] TASK - [Rollback: Installing removed packages] **************************** [11/03/2022 15:27:51] DEBUG - Calling command 'rpm -i --replacepkgs /var/lib/convert2rhel/backup/dnf-plugin-subscription-manager-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/python3-subscription-manager-rhsm-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/subscription-manager-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/subscription-manager-rhsm-certificates-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/centos-linux-repos-8-3.el8.noarch.rpm /var/lib/convert2rhel/backup/centos-linux-release-8.5-1.2111.el8.noarch.rpm' [11/03/2022 15:27:51] DEBUG - error: Failed dependencies: python3-cloud-what = 1.28.21-3.el8 is needed by python3-subscription-manager-rhsm-1.28.21-3.el8.x86_64 python3-cloud-what = 1.28.21-3.el8 is needed by subscription-manager-1.28.21-3.el8.x86_64 python3-syspurpose = 1.28.21-3.el8 is needed by subscription-manager-1.28.21-3.el8.x86_64 centos-gpg-keys = 1:8-3.el8 is needed by centos-linux-repos-8-3.el8.noarch WARNING - Couldn't install /var/lib/convert2rhel/backup/dnf-plugin-subscription-manager-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/python3-subscription-manager-rhsm-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/subscription-manager-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/subscription-manager-rhsm-certificates-1.28.21-3.el8.x86_64.rpm /var/lib/convert2rhel/backup/centos-linux-repos-8-3.el8.noarch.rpm /var/lib/convert2rhel/backup/centos-linux-release-8.5-1.2111.el8.noarch.rpm packages. ## Second convert2rhel run [11/03/2022 15:28:29] TASK - [Prepare: Checking if the installed packages are up-to-date] ******* [11/03/2022 15:28:29] DEBUG - Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/convert2rhel/main.py", line 100, in main checks.perform_system_checks() File "/usr/lib/python3.6/site-packages/convert2rhel/checks.py", line 126, in perform_system_checks check_package_updates() File "/usr/lib/python3.6/site-packages/convert2rhel/checks.py", line 656, in check_package_updates packages_to_update = get_total_packages_to_update(reposdir=reposdir) File "/usr/lib/python3.6/site-packages/convert2rhel/pkghandler.py", line 1037, in get_total_packages_to_update packages = _get_packages_to_update_dnf(reposdir=reposdir) File "/usr/lib/python3.6/site-packages/convert2rhel/pkghandler.py", line 1079, in _get_packages_to_update_dnf base.read_all_repos() File "/usr/lib/python3.6/site-packages/dnf/base.py", line 545, in read_all_repos for repo in reader: File "/usr/lib/python3.6/site-packages/dnf/conf/read.py", line 42, in __iter__ for r in self._get_repos(self.conf.config_file_path): File "/usr/lib/python3.6/site-packages/dnf/conf/read.py", line 109, in _get_repos parser.setSubstitutions(substs) File "/usr/lib64/python3.6/site-packages/libdnf/conf.py", line 1980, in setSubstitutions return _conf.ConfigParser_setSubstitutions(self, substitutions) 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 &'
Preliminary observations:
- this issue manifests when:
- the subscription-manager package is already installed prior to the conversion
- version of the sub-man dependencies python3-cloud-what and python3-syspurpose are older than those in the UBI repo from which we download new sub-man packages including python3-cloud-what and python3-syspurpose
- something that triggers a rollback happens after the installation of the pre-downloaded sub-man pkgs
- during the installation of the pre-downloaded sub-man pkgs the python3-cloud-what and python3-syspurpose are being updated. We don't back them up for rollback purposes.
- during the rollback we try to install back the sub-man packages we removed, not including the python3-cloud-what and python3-syspurpose though, and because the required dependency versions of the formerly installed sub-man pkgs are different, the installation fails