-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
False
-
False
-
-
8
-
2023-Q1, 1.4 GA, 2023-Q2, 2023-R4, 2024-R2
-
-
-
-
Testable
The checks convert2rhel performs don't expect the system to have RHEL repos enabled on the system.
This can happen for instance if a customer:
- defines custom RHEL repos in /etc/yum.repos.d/ and does not specify enabled=0
- uses a single Satellite activation key that enables both original vendor and RHEL repos available
For example when checking whether the system has the latest kernel installed we expect the original OS vendor repos to be enabled (CentOS, Oracle, ..) and if RHEL repos are enabled convert2rhel might provide misleading suggestions about what kernel the customer shall install prior to the conversion. On OL7.9 with the latest updates and with having the rhel-7-server-rpms repo enabled, this critical-level error message appears:
SystemExit: The version of the loaded kernel is different from the latest version in the enabled system repositories. Latest kernel version available in rhel-7-server-rpms: 3.10.0-1160.83.1.el7 Loaded kernel version: 3.10.0-1160.83.1.0.1.el7 To proceed with the conversion, update the kernel version by executing the following step: 1. yum install kernel-3.10.0-1160.83.1.el7 -y 2. reboot
The conversion is inhibited when the loaded OL7 kernel-3.10.0-1160.83.1.0.1.el7 is newer than the kernel-3.10.0-1160.83.1.el7 available in the enabled RHEL 7 repo.
Reproducer:
- Install kernel (3.10.0-1160.83.1.0.1.el7) from the Oracle Linux 7 official repository
- Set the default kernel to above mentioned and reboot to it
- EnableĀ ONLY the Red Hat repository (rhel-7-server-rpms)
- Run convert2rhel and observe the error
Acceptance criteria:
- To ensure that all checks convert2rhel performs will ignore RHEL repositories that are enabled on the system at the time of executing convert2rhel:
- convert2rhel disables repos named "rhel-*" (Reason: all repoids of RHEL repositories provided by Red Hat start with rhel-, e.g. rhel-7-server-rpms or rhel-8-for-x86_64-baseos-rpms)
- convert2rhel disables repos passed through the --enablerepo at the beginning of its execution
Then we look at all the enabled repos on the system and check the signature of any package from each repo to make sure there's no package signed by Red Hat. If we detect a Red Hat package in any of the enabled repos we disable the repo and print a warning to the user that we've done so.- [Michal] I've removed this step as it's not easy to implement and it's not straightforward how to approach it ("what package to query from each repo?"). It solves a low-probability corner case where the customer has defined and enabled a RHEL repo with a non-default repoid in /etc/yum.repos.d/ AND they don't specify this RHEL repoid in the --enablerepo convert2rhel cli option. For that reason it's IMHO not worth the effort and we can implement it only if a customer reports bumping into this.
- We have an integration test that makes sure that the conversion succeeds even with RHEL repos enabled.
- blocks
-
RHELC-1313 convert2rhel to not register a system to Satellite
- Closed
- is related to
-
RHELC-1040 Offline conversion: backup of a conflicting pkg fails
- Closed
-
RHELC-777 [RFE]: When testing for latest kernel version, versions from different major releases should not be considered
- Closed
- relates to
-
RHELC-1003 CONVERT2RHEL_UNSUPPORTED_SKIP_KERNEL_CURRENCY_CHECK does not skip the check
- Closed
-
RHELC-667 Improve package version comparison
- Closed
- links to
-
RHEA-2024:132672 convert2rhel bug fix and enhancement update
-
RHEA-2024:132673 convert2rhel bug fix and enhancement update