Debian New Host

Trying to register new Debian 11 host I receive the following error , any thoughts?

Running registration

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package katello-ca-consumer*
E: Couldn’t find any package by glob ‘katello-ca-consumer*’
E: Couldn’t find any package by regex ‘katello-ca-consumer*’
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package subscription-manager
‘/etc/rhsm/rhsm.conf’ not found, cannot configure subscription-manager

Did you add the repository providing the package as it is not part of Debian’s base repositories? It is hosted by ATIX and you can find the instructions at Debian

2 Likes

It needs the following?
I was thought that just an registration will fix all as in RHEL

Usage on Debian 11 (Bullseye)

  1. Add repository
    deb https://oss.atix.de/Debian11/ stable main
  2. Import ATIX GPG public key
    https://oss.atix.de/atix_gpg.pub
  3. Install subscription manager
    apt-get install -y python3-subscription-manager

I think you got this information from here right?

Because you first need the part above the specific options for Debian 11/12 as well:

wget --no-check-certificate -O katello-rhsm-consumer https://foreman.example.com/pub/katello-rhsm-consumer
/bin/bash -x katello-rhsm-consumer 2< /root/katello-rhsm-consumer.log
You can now run subscription-manager register --org="my-organisation" --name="my-host.example.com" --activationkey="my-activation-key" to subscribe your host to Foreman.

1 Like

Yes, but I think this is part of the register template already, so making the repository available should be enough. The register command is the new preferred way to bring an already existing host into Foreman/Katello over the direct use of subscription-manager register.

Yeah I think so too that most of the stuff that the register template covers most of the stuff, but if the client does not trust the CA which signed the cert yet, then you definitely need it (or manually add it to the truststore), right?

Yes, but the certificate is “installed” on the system in the snippet subscription_manager_setup right before the register by getting it from a variable, copying to a temporary file and then to the final location what looks quite complicated but seems necessary because of the option to unregister: foreman/app/views/unattended/provisioning_templates/snippet/subscription_manager_setup.erb at develop · theforeman/foreman · GitHub

1 Like