Satellite returns repository not found when trying to disable RHEL 8 repositories

Solution Verified - Updated

Environment

  • Satellite 6

Issue

When trying to disable a RHEL 8 repository, Satellite is returning a "Repository not found" error.

Resolution

Update the arch field of each RHEL 8 repository that is set to x86_64 and set it to noarch.

# echo "update katello_root_repositories set arch = 'noarch' where content_id IN (select content_id from katello_root_repositories where name like '%Red Hat Enterprise Linux 8 for x86_64%' and arch = 'x86_64');"|su - postgres -c "psql foreman"

For more KB articles/solutions related to Red Hat Satellite 6.x Repository Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Repository Issues.

Root Cause

Root repositories have the wrong architecture set on the DB. Therefore, when katello tries to disable a repository it filters for the architecture that is expected and can't find the repository.

Diagnostic Steps

See if there are RHEL 8 repositories with the architecture set to x86_64 on the DB:

# echo "select id,name,content_id,arch from katello_root_repositories where name like '%Red Hat Enterprise Linux 8 for x86_64%' and arch = 'x86_64';" | su - postgres -c "psql foreman"
 id  |                                         name                                         | content_id |  arch  
-----+--------------------------------------------------------------------------------------+------------+--------
   1 | Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs x86_64 8                      | 7441       | x86_64
   2 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs x86_64 8                         | 7416       | x86_64
   3 | Red Hat Enterprise Linux 8 for x86_64 - Supplementary RPMs x86_64 8                  | 7932       | x86_64
  39 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart x86_64 8.2                  | 7421       | x86_64
  38 | Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart x86_64 8.2               | 7446       | x86_64

SBR
Product(s)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.