EL9 kickstart using rhsm

Problem:
I have to install a couple of servers with AlmaLinux 9.1. Unlike before with AlmaLinux 8 installation it doesn’t work that well. The installed server is not connected to Katello and thus is also missing puppet, etc. The installer runs through without obvious errors. It installs the base system from my content proxy.

Templates are now using rhsm in kickstart with EL9. I have this line in the kickstart:

rhsm --organization="ORG" --activation-key="Standard AlmaLinux 9 Server" --server-hostname foreman8-content.example.com --rhsm-baseurl https://foreman8-content.example.com/pulp/content

As far as I can tell, this doesn’t do anything with AlmaLinux 9. There is no indication that it is handled nor any error regarding this in the anaconda logs. It seems to me as if the rhsm kickstart command is simply ignored.

When searching for rhsm in the anaconda logs I only find this:

anaconda.log:17:49:17,855 WRN kickstart: Command rhsm will be parsed in DBus module.

The only indication of the work subscription is this:

syslog:17:49:15,554 WARNING org.fedoraproject.Anaconda.Boss:DEBUG:anaconda.modules.boss.module_manager.start_modules:Skip org.fedoraproject.Anaconda.Modules.Subscription. The module won't be started, because it's marked as forbidden in the Anaconda configuration files.

Digging into github I have found that it is indeed forbidden for AlmaLinux:

as it is for rocky or centos.

So it seems to me this is intended. rhsm is reserved for RHEL only. Using it in the templates for any EL9 is incorrect then.

Foreman and Proxy versions:
foreman-3.5.1-1.el8.noarch
katello-4.7.3-1.el8.noarch

Distribution and version:
AlmaLinux 8.7

This was introduced with https://github.com/theforeman/foreman/pull/9399 for issue Bug #35331: RHEL 9 provisioned host goes into emergency mode after initial reboot - Foreman

While the pull requests references rhel9 correctly, the code in the template checks only for rhel_compatible

The rhsm support was deliberately disabled in all non-pure-RHEL installers via Setup RHEL rebuilds to exclude subscription-manager by jcpunk · Pull Request #2546 · rhinstaller/anaconda · GitHub, but I don’t really understand why

Maybe @jcpunk can enlighten us? :smiley:

Well, either way: at the moment it’s broken for EL9 except RedHat. I have modified the template to use the old redhat_register snippet again and it works fine.

So until maybe rhsm works on other EL9 distros as well I would say the template should only use rhsm for RHEL9 at this time…

1 Like

Indeed anaconda/almalinux.conf at d8e430dc030f1fafa92d09a566be477d2e6606cf · rhinstaller/anaconda · GitHub. I too would be very curious to know!

1 Like

Linking back:
https://github.com/theforeman/foreman/pull/9745

1 Like

Yeah - this (using redhat_register) is essentially what we are doing for CS9. Not the end of the world I guess :slight_smile:

Thanks for the follow up @ekohl.