Problem:
subscription-manager repos
This system has no repositories available through subscriptions.
We are able to subscribe a ubuntu 18.04 host with the subscription manager and we can see:
subscription-manager list --match-installed --consumed --available
No available subscription pools to list
±------------------------------------------+
Consumed Subscriptions
±------------------------------------------+
Subscription Name: Ubuntu_18-04
Provides: Ubuntu_18-04
SKU:
Contract:
Account:
Serial:
Pool ID:
Provides Management: No
Active: True
Quantity Used: 1
Service Type:
Roles:
Service Level:
Usage:
Add-ons:
Status Details: Subscription is current
Subscription Type: Standard
Starts: 08/16/2022
Ends: 12/01/2049
Entitlement Type: Physical
That the required subscription is active and is correct. However there’s no repositories assigned and we cannot find the reason nor error why.
Expected outcome:
The repositories from ubuntu that we host ourselfs in foreman, to show up on our host ubuntu 18.04.
Other relevant data:
Here are the repo’s/products working well:
I’ve went trough a few video’s and the documentation. I feel like i’ve missed something as i remember that we got it to work once, but then couldn’t get any packages to show up.
as you can see in the last image, your content view only contains 122 Deb packages. That would match the backports repository. But that also means, that the other repositories are not part of your content view and with that your host cannot see them. Probably you published the content view before the sync of the repostitories was finished or you forgot to put the other repos into the content view.
On the other side your host should get at least the backports repository.
Could you check /etc/apt/sources.list.d/rhsm.sources - this should contain the repositories made available via subscription-manager.
#
# Certificate-Based Repositories
# Managed by (rhsm) subscription-manager
#
# *** This file is auto-generated. Changes made here will be over-written. ***
# *** Use "subscription-manager repo-override --help" if you wish to make changes. ***
#
# If this file is empty and this system is subscribed consider
# a "apt-get update" to refresh available repos
#
# *** DO NOT EDIT THIS FILE ***
#
I also promoted it again as i may have been a bit to early indeed with my publish + promotion.
I tried to also re-subscribe but sadly still no improvements yet.
Also, for the architectures we could only specify amd64 and i386 from the upstream repo’s.
The ubuntu machine does specify x86_64 when using uname -a. Not sure if that might cause a problem.
So i’m trying a slighty different route as i want to find an erro message somewhere. I did the following to get something:
in the sources.list, i added this CV we publish but can’t auto attach:
deb [trusted=yes] https://thelinux.server.lan/pulp/content/company/Library/custom/Ubuntu_18-04/bionic-backports_main_restricted_universe_multiverse/ bionic-backports main restricted universe multiverse
now apt update does seem to communicate with it, but can’t b/c of this:
E: Failed to fetch https://thelinux.server.lan/pulp/content/companyname/Library/custom/Ubuntu_18-04/bionic-backports_main_restricted_universe_multiverse/dists/bionic-backports/main/binary-amd64/Packages Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: this-is-the-ip-of-foreman 443]
I also run behind a proxy and if i would add these lines back in the environment file:
I’m still waiting for the network guys to allow DNS traffic fully.
Is it normal after that i install katello-rhsm-consumer from the forman server, that trying again but withoud insecure ssl on gives me the error that it can’t verify it? I wonder if the issue is b/c the selfsigned cert isn’t trusted and therefore, subscription manager doesn’t want to add the repos.
i wanted to try this after i redid the everything up to the products (b/c those i can’t really change much)
But now i seem to be stuck that i cannot delete the host from foreman-katello.
All the ways i tried (even with the rake console) let to it saying it’s deleted, but it doesn’t and if i try trough the edit button on the /hosts i get this:
So i resetted the whole foreman-katello with the command and when i rebuild everything from the products op to the activation key (exactly the same). It worked on the host.
It’s still very strange that i cannot remove a host from the ui whatsoever.
Not being able to delete the host sounds like a new and separate issue to me.
Perhaps open a new thread for it (linking back to this one). You probably also want to include the foreman log covering a time period where you tried to delete the host in question.
Depends on your settings. In Administer → Settings there is an option if you want the VM to be deleted as well (and the default is “no”).
In most cases those kind of errors occur if you changed something like DNS/DHCP/Compute Ressource and Foreman tries to delete something, which is not available (because you did not configure DNS before). Then the deletion fails. In most cases you can remove it from the host list by editing the host, unmanage it and delete it afterwards.
We don’t use any of the compute resources functionality. The vm was already deployed and we only registered it with the subscription-manager. We didn’t change any of the other parts as those roles are fufilled by other vm’s in our network.
The weird thing is that doing what you proposed does succeed, but no changes are made in the UI to reflect that weirdly enough.
Is there a command to remove it from the UI in a safely manner? Given that’s unregistered, not a vm made by foreman and that it showing in the UI in all hosts is the only place in the UI to find it.