Content hosts not creating redhat.repo correctly for Rocky 8 host

Foreman/Katello 3.4.1

I have lots of repos in foreman with content hosts of centos 7 and rocky8. So far all the Centos7 hosts seem fine. However, when I subscribe a new Rocky 8 host its not seeing all the repos. In fact its only seeing one. When I run:

rct cat-cert /etc/pki/entitlement/4967485660674515538.pem I see all the repos listed at the bottom under Content.  When I look at whats in /etc/yum.repos.d/redhat.repo I see only the very first repo that was listed in /etc/pki/entitlement/4967485660674515538.pem.

subcription-manager refresh does nothing.
I enabled debug logs in candlepin and force re-added a host.  But there were no errors that I saw in the logs.

I took the partial urls from /etc/pki/entitlement/4967485660674515538.pem and tried to hack up a more inclusive redhat.repo but that did not improve things.  I am actually getting this error now when I do a yum clean all:
> [root@TQ3US1DEVQA16-HOST01 yum.repos.d]# yum clean all
> Updating Subscription Management repositories.
> Bad id for repo: Rocky 8 - AppStream - x86_64, byte =   12
> Bad id for repo: Rocky 8 - Base - x86_64, byte =   12
> Bad id for repo: Rocky 8 - Extras - x86_64, byte =   12
> Bad id for repo: Rocky 8 - PowerTools - x86_64, byte =   12
> 10 files removed

I feel stupid… I had set a restriction for os version rhel-8. Once I removed the restriction I was able to see the repos.

1 Like