-
Bug
-
Resolution: Done
-
Major
-
None
-
None
Preface
Customers with a system not connected to the internet and connected only to an on-premise Satellite server should be able to use a single activation key that provides both the CentOS and RHEL repositories for the conversion. The standard/documented approach with two activation keys involves a re-registration which is defective in the fact that the system becomes unregistered after performing an analysis. The single activation key approach does not involve re-registration during the conversion.
Recording of a demo from ahosek@redhat.com showcasing this novel approach together with the problem described below: https://drive.google.com/open?id=1Y695cAn6m3MKcqP_12RzQKi2_bb9XPLZ&authuser=0.
The problem
During pre conversion, we disable all repositories. In the next step we enable just the RHEL repositories we need (either the default repoid as defined in the distro related configs or the repoids specified by the customer through the --enablerepo CLI option). https://github.com/oamg/convert2rhel/blob/main/convert2rhel/actions/pre_ponr_changes/subscription.py#L202
But when you run the "convert2rhel analyze" and the system is using Satellite with a single activation key that provides both original vendor repos and RHEL repos, all repos including the original vendor repos are disabled. After disabling all repos convert2rhel enables just the specific RHEL repos. However, the rollback does not revert both the disabling and enabling of repos.
When using the single activation key, its expected that before running convert2rhel the original vendor repos are enabled and RHEL repos disabled. But after the analysis step the system is left in an opposite configuration - the repos from the original vendor are disabled and the RHEL repos enabled.
Reproducer:
- register a system to Satellite with an activation key that provides both CentOS 7 and RHEL 7 repos - subscription-manager register --org="Default_Organization" --activationkey="rhel7_and_centos7"
- make sure the CentOS 7 repo is enabled and the RHEL 7 repo disabled prior to running convert2rhel - subscription-manager repos --enable=Default_Organization_CentOS_Linux_7_CentOS_Linux_7 --enable=Default_Organization_CentOS_Linux_7_CentOS_Linux_7_Updates_faster_fit --disable=rhel-7-server-rpms
- a workaround until
RHELC-1385is fixed - sed -i 's| and repo != "redhat.repo":|:|' /usr/lib/python2.7/site-packages/convert2rhel/actions/pre_ponr_changes/backup_system.py - run convert2rhel without credentials - convert2rhel analyze -y --debug
Possible solution:
- remove the disabling of repos through sub-man completely, it's probably not needed (by mbocek@redhat.com)
- add new restorable which whould disable the enabled repos from this step
Acceptance Criteria:
- repos after analysis are in the same enabled/disabled state as before the conversion
- duplicates
-
RHELC-1159 Most Repos are disabled on a Satellite Registered CentOS Server after an analyze is run
- Closed
- links to
-
RHEA-2024:132672 convert2rhel bug fix and enhancement update
-
RHEA-2024:132673 convert2rhel bug fix and enhancement update