Closed runephilosof-karnovgroup closed 1 month ago
Can you show us the output of curl -u admin:password https://foreman.example.com/katello/api/repository_sets/7416/available_repositories
?
curl -u admin:password https://xxx/katello/api/repository_sets/7416/available_repositories?organization_id=1
# {"total":0,"subtotal":0,"selectable":0,"page":null,"per_page":null,"error":null,"search":null,"sort":{"by":null,"order":null},"results":[]}
"Good" (for some values of good, at least).
This says that your Katello thinks there are no repositories available. That can have multiple reasons: connection problems reaching cdn.redhat.com
, expired Manifest, expired Subscriptions (among others). Could you have a look at /var/log/foreman/production.log
around the time you perform the curl
, are there any errors or warnings?
requesting https://xxx/katello/api/repository_sets/7416/available_repositories?organization_id=1 gives the following error in the production.log
2024-05-22T09:58:53 [I|app|432a8b3c] CDN: Requesting path https://cdn.redhat.com:443/content/dist/rhel8/listing
2024-05-22T09:58:53 [E|app|402c9519] Failed at scanning for repository: CDN loading error: access forbidden to https://cdn.redhat.com:443/content/dist/rhel8/listing
I must have made some error, when I converted the manifest to be ansible controlled, removing access to them.
However, it is confusing that the web ui shows them as available on https://xxx/redhat_repositories with the selector set to available
and recommended
.
https://xxx/katello/api/v2/repository_sets?organization_id=1&with_active_subscription=true&search=(((name+!~+source+rpm)+and+(name+!~+debug+rpm)+and+(content_type+%3D+yum)+and+(label+!~+beta)+and+(label+!~+htb)+and+(name+!~+beta)+and+(product_name+!~+beta)))+and+(label+%3D+rhel-9-for-x86_64-baseos-rpms+or+label+%3D+rhel-9-for-x86_64-baseos-kickstart+or+label+%3D+rhel-9-for-x86_64-appstream-rpms+or+label+%3D+rhel-9-for-x86_64-appstream-kickstart+or+label+%3D+rhel-8-for-x86_64-baseos-rpms+or+label+%3D+rhel-8-for-x86_64-baseos-kickstart+or+label+%3D+rhel-8-for-x86_64-appstream-rpms+or+label+%3D+rhel-8-for-x86_64-appstream-kickstart+or+label+%3D+rhel-8-for-x86_64-baseos-eus-rpms+or+label+%3D+rhel-8-for-x86_64-appstream-eus-rpms+or+label+%3D+rhel-7-server-rpms+or+label+%3D+rhel-7-server-optional-rpms+or+label+%3D+rhel-7-server-extras-rpms+or+label+%3D+rhel-7-server-kickstart+or+label+%3D+satellite-client-6-for-rhel-9-x86_64-rpms+or+label+%3D+satellite-client-6-for-rhel-8-x86_64-rpms+or+label+%3D+rhel-7-server-satellite-client-6-rpms+or+label+%3D+rhel-6-server-els-satellite-client-6-rpms+or+label+%3D+satellite-capsule-6.15-for-rhel-8-x86_64-rpms+or+label+%3D+satellite-maintenance-6.15-for-rhel-8-x86_64-rpms+or+label+%3D+satellite-utils-6.15-for-rhel-8-x86_64-rpms)
returns 12 results, among others the rhel-8-for-x86_64-baseos-rpms
.
When making the above query the production.log does not contain CDN: Requesting path
I think the UI just assumes enabled repos to be available, and thus "tricks" you in the view. I am honestly not sure what's more correct here. Given the repository is actually enabled, you could argue the "enable it" action would be a noop and thus we should consider it "available", on the other hand there is clearly an issue with your setup and you might not have noticed otherwise? (I would expect syncs of that repo to fail too, btw)
Yes, the syncs were also failing.
I clicked the refresh
button in the manage manifest modal which made it all work again.
Very confusing, especially because the ui says nothing about what refreshing the manifest means and when it will be necessary to do.
It does not seem like anything needs to be changed in the foreman-ansible-modules, unless you want to suggest refreshing the manifest in the error message.
I don't think changing the error message makes sense (there are many different reasons why repos can't be found, this is just one of them)
But I pinged @jeremylenz whether Katello could more prominently expose the need for a refresh in the UI.
SUMMARY
repository_set
cannot find the repository Hammer can find it and see that it is enabledISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
KATELLO/FOREMAN VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
The repository_set is already enabled, so it should just be
ok
ACTUAL RESULTS