Convert2RHEL failing when converting via Satellite repo

Latest response

I've been attempting to convert hosts (both CentOS 7 and CentOS 8) to RHEL using Convert2RHEL, pointing at our Satellite infrastructure:

# convert2rhel -o our-org -t org-rhel8-nonprod --debug

The conversion gets halfway through until the point where it checks for kernel modules being available in the new repo:

[11/04/2021 17:58:35] TASK - [Convert: Subscription Manager - Enable RHEL repositories] *********
[11/04/2021 17:58:35] DEBUG - Calling command 'subscription-manager repos --enable=rhel-8-for-x86_64-baseos-rpms --enable=rhel-8-for-x86_64-appstream-rpms'
Repositories enabled through subscription-manager

[11/04/2021 17:58:38] TASK - [Convert: Final system checks before main conversion] **************
[11/04/2021 17:58:38] DEBUG - Getting a list of loaded kernel modules.
[11/04/2021 17:58:38] DEBUG - Calling command 'lsmod'
[11/04/2021 17:58:38] DEBUG - Calling command 'modinfo -F filename vsock_loopback'

but alas, at this point it crashes out because the repomd.xml file it's attempting to pull from Pulp is 404:

[11/04/2021 17:58:38] DEBUG - Calling command 'modinfo -F filename fuse'
[11/04/2021 17:58:38] DEBUG - Calling command 'repoquery --releasever=8.4 --setopt=module_platform_id=platform:el8 --repoid rhel-8-for-x86_64-baseos-rpms --repoid rhel-8-for-x86_64-appstream-rpms -f /lib/modules/*.ko*'
[11/04/2021 17:58:40] DEBUG - Output of the previous repoquery command:
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  1.3 kB/s | 224  B     00:00
Errors during downloading metadata for repository 'rhel-8-for-x86_64-baseos-rpms':
  - Status code: 404 for https://satellite.[domain.removed]/pulp/repos/our-org/Our-Org/Universal/content/dist/rhel8/8.4/x86_64/baseos/os/repodata/repomd.xml (IP: 172.31.242.15)
Error: Failed to download metadata for repo 'rhel-8-for-x86_64-baseos-rpms': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

CRITICAL - No packages containing kernel modules available in the enabled repositories (rhel-8-for-x86_64-baseos-rpms, rhel-8-for-x86_64-appstream-rpms).
[11/04/2021 17:58:40] DEBUG - Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/convert2rhel/main.py", line 91, in main
    pre_ponr_conversion()
  File "/usr/lib/python3.6/site-packages/convert2rhel/main.py", line 209, in pre_ponr_conversion
    checks.perform_pre_ponr_checks()
  File "/usr/lib/python3.6/site-packages/convert2rhel/checks.py", line 57, in perform_pre_ponr_checks
    ensure_compatibility_of_kmods()
  File "/usr/lib/python3.6/site-packages/convert2rhel/checks.py", line 186, in ensure_compatibility_of_kmods
    rhel_supported_kmods = get_rhel_supported_kmods()
  File "/usr/lib/python3.6/site-packages/convert2rhel/checks.py", line 261, in get_rhel_supported_kmods
    ", ".join(system_info.get_enabled_rhel_repos())
  File "/usr/lib/python3.6/site-packages/convert2rhel/logger.py", line 104, in _critical
    sys.exit(msg)
SystemExit: No packages containing kernel modules available in the enabled repositories (rhel-8-for-x86_64-baseos-rpms, rhel-8-for-x86_64-appstream-rpms).

WARNING - Abnormal exit! Performing rollback ...

I've been banging my head against this for a day now and just can't figure it out. Everything else works fine - we can provision RHEL hosts from Satellite, and so on. My searches haven't turned up this problem elsewhere, although it's possibly my search skills just aren't that good.

Has anyone else seen this issue / can advise on how to work around it?

Thanks!
Mike

Responses

As a little more data - I've regenerated metadata, republished and repromoted, etc, etc. Nothing changes.

Hello Mike,

Which repos have activated in the Content View that you use for the conversion?

The requirements are very specific. Sorry for this non-answer. I do not use CentOS, so never tried a conversion.

You may need to open a support case

Regards,

Jan Gerrit

Here they are:

ID:                           2
Name:                         RHEL8
Label:                        RHEL8
Composite:                    false
Description:
Content Host Count:           3
Force Puppet:                 true
Solve Dependencies:           true
Organisation:                ourorgname
Yum Repositories:
 1) ID:    5
    Name:  Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8
    Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_AppStream_RPMs_8
 2) ID:    6
    Name:  Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8
    Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_BaseOS_RPMs_8
 3) ID:    9
    Name:  Red Hat Satellite Tools 6.9 for RHEL 8 x86_64 RPMs
    Label: Red_Hat_Satellite_Tools_6_9_for_RHEL_8_x86_64_RPMs
 4) ID:    14
    Name:  Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.4
    Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_BaseOS_Kickstart_8_4
 5) ID:    13
    Name:  Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.4
    Label: Red_Hat_Enterprise_Linux_8_for_x86_64_-_AppStream_Kickstart_8_4
Container Image Repositories:

OSTree Repositories:

Puppet Modules:

Lifecycle Environments:
 1) ID:   1
    Name: Library
 2) ID:   6
    Name: NameHere
Versions:
 1) ID:        18
    Version:   4.0
    Published: 2021/11/04 20:13:26
 2) ID:        21
    Version:   5.0
    Published: 2021/11/04 20:32:41
Components:

Aha! I don't have the 8.4 RPM repos. Let's see if that changes anything...

Hi there, I'm actually trying to convert several CentOS 7 and CentOS 8 machines to RHEL - behind a satellite. I might mention, that these machines are already registered to the Satellite. Of course, right now the Satellite serves them with CentOS Repos, but I also have already some RHEL machines which also get served by the satellite.

To get it in short points, I have:

  • several CentOS 7.9 VMs already registered to my Satellite
  • several CentOS 8.5 VMs already registered to my Satellite
  • all of these CentOS VMs shall be converted to RHEL ( 7.9/8.5)

First question: In this special case, is convert2rhel even needed? Or do I just need to do changes on the subscription-manager and do a "yum distro-sync" ?

Second Question: In case that I need to use convert2rhel, how do I get it into satellite? I already tried to put it into satellite, but the sync always fails with "RPM1004: Error retrieving metadata: A connection error occurred" ... so before I get more headaches, even better if I might not need it ... (by the way: RHEL 7/8, Rocky 8, CentOS 7 and CentOS 8 are already successfully put into Satellite - so it's not like it's not working at all)

Third Question: Is there any documentation describing this special case? I found plenty manuals doing the conversion, but none of them described it in detail for the case, "the only source is the satellite" (of course, the satellite is connected to internet).

Would be happy to get some hints :-)

Actually I still have the same issue with the ... let's call it "missing Kernel modules". I still have CentOS 8.5 running and can't convert to RHEL 8.5 ... any ideas on this? Is 8.5 supported?

In my case, I had to enable ans sync RHEL 8.5 repositories (not just 8). Then it worked just fine.

Answer to the first question: I'm not an expert on convert2rhel itself, but I know it does many more checks before it performs the conversion as well as it makes backups in case something goes wrong.

Answer to the second question: Satellite 6.11 comes with Ansible that helps to configure Satellite for the conversions. It support CentOS 7,8 and Oracle 7,8. While it may be possible for also other derivates, it's not officially tested and supported. See https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#converting-a_host-with-convert2rhel_content-management for the documentation on the procedure.

Once the Satellite is configured properly, it's a matter of registering CentOS (or other) machines to Satellite (make sure REX is working on such machines if they are already registered) and running a converting job with the desired RHEL activation key.

Hope this helps.

Hi Marek,

yes, for CentOS 8.5 this was indeed the problem: I had to activate the RHEL 8.5 REPO additionally to get this worked.

Thanks for the hint :-)