Correctly identify AlmaLinux

From the epel repo :slight_smile: .Till now I never installed facter on clients but having this issue with correctly identifying the OS I’m trying to find why is that.

Does anyone knows where facter grabs it’s data in this case because /etc/redhat-release, /etc/os-release and almalinux-release looks good.

I linked the exact patch that implements it and gave it the version. If you want EPEL8 to support AlmaLinux, this is the place to request it to be updated to 3.14.19 (I already selected product Fedora EPEL and component facter in that URL).

@ekohl It’s actually worse for CentOS: facter will label any CentOS 8 simply with name “CentOS”.

However, actually it’s
NAME=“CentOS Linux”
and
NAME=“CentOS Stream”

Due to that, current CentOS 8.4 hosts are listed as “CentOS 8.4.2105” while CentOS 8 Stream is just “CentOS 8”.

It also complicates things for building hosts, because the operating system to use the synced content is “CentOS_Linux 8” for non-stream version and “CentOS 8” for stream version. Totally confusing…

While it’s confusing, we should also remember that CentOS Linux 8 is EOL in 4 months. Renaming that is a big functional change and I suspect the ecosystem will align on CentOS 8 = CentOS 8 Stream. While it’s easy to say and I do appreciate the actual implications are very annoying, I do think we should already start with treating it that way.

Well, I see your point that CentOS Linux 8 is EOL, soon. But still, names should match. The name for Stream in the distribution .treeinfo is “CentOS Stream” which creates the operating system “CentOS_Stream-8” in foreman (at least, I have that and I have nevre create an operating system manually in foreman). CentOS Stream 8 server, however, end up as “CentOS 8” due to facter.

I also have “AlmaLinux-8” as operating system but my almalinux host has operating system “Alma Linux 8.4”.

Naming conventions should match. Whether it’s “CentOS_Stream” or “CentOS Stream” or just “CentOS”, ideally this should be a single operating system entry for foreman. But considering, the official name is “CentOS Stream” and that’s also the name in .treeinfo and /etc/os-release, and I think that should be the name officially used and consistently shown. And .treeinfo or os-release seems to be the source for this…

1 Like

I see your point and must admit that at this point it’s been too long since I was an actual sysadmin and I’m starting to be more removed from it. It’s even worse for other developers who have never been a sysadmin or only worked with a single system (RHEL sysadmins may not know CentOS or Debian).

It’s hard to figure out what the right thing to do is. What I think is needed is an overview. Basically a (large) table with each OS/distro version and what each resource reports. This may differ a bit for each OS family (Debian has no .treeinfo but maybe there’s an equivalent). Any thoughts with how we could structure this information as a reference source?

What will definitely not work is having separate parsing classes for each individual input (Puppet, Ansible, Katello sync, RHSM). We need a central place, perhaps a directory with separate class per operating system (this cannot be in our Operatingsystem model class because that does not differentiate several Redhat variants). Having those detection rules on a single place would ensure that no matter what tool it matches, the result (OS name, major, minor, description) is the same. One huge hash/array is also an option, although that could be unreadable pretty soon.

Let me do a summary of what we have today and then we can talk about what to improve. This page is a wiki, please contribute. When unsure, use ? character. Looks like it’s a mess and I only compare Foreman/Puppet/Katello (Ansible and others only make this worse):

Current status

Real name Foreman name Foreman description Katello description
CentOS 7.9 RedHat Red Hat 7.9.2009 CentOS-7
CentOS 8.4 RedHat Red Hat 8.4.2105 CentOS_Linux-8
RHEL 7.9 RedHat Red Hat 7.9 RedHat-7.9
RHEL 8.0 RedHat Red Hat 8.0 RedHat-8.0.0
RHEL 8.4 RedHat Red Hat 78.4 RedHat-8.4
CentOS Stream 8 RedHat Red Hat 8.0 CentOS_Stream-8

Remarks

  • Foreman OS name must not contain spaces (as it is used in filenames etc)
  • Foreman description, however, is an independent text field that can contain anything
  • Katello description shows how Katello plugin sets the description field (it also sets Name, Minor and Minor version)
  • I think RedHat-8.0.0 looks like a bug

With puppet 6 my almalinux hosts were reporting in as red had, switching to puppet 7 seemed to resolve it and have them properly display as almalinux.

1 Like