os release facter not parsing dracut version

37 views
Skip to first unread message

Melissa Ip

unread,
Jun 22, 2023, 2:09:04 PM6/22/23
to Puppet Users
Hi, I'm trying to use the os.release facter on a VM that is running CloudLinux dracut.

/etc/os-release looks like this:

NAME="dracut" VERSION="8.7 (Valeri Polyakov) dracut-049-223.git20230119.el8" ID=dracut VERSION_ID=049-223.git20230119.el8 PRETTY_NAME="CloudLinux 8.7 (Valeri Polyakov) dracut-049-223.git20230119.el8 (Initramfs)" ANSI_COLOR="0;31"

The os facter output looks like this:

os => {
  architecture => "x86_64",
  family => "Dracut",
  hardware => "x86_64",
  name => "dracut",
  release => {
    full => "049-223.git20230119.el8",
    major => "049-223.git20230119.el8"
  },
  selinux => {
    enabled => false
  }
}

I expect the os.release.major value to be 8, not 049-223.git20230119.el8. Is this a bug?

Thanks for any help here, Melissa

Bart-Jan Vrielink

unread,
Jun 23, 2023, 1:18:32 AM6/23/23
to Puppet Users

Hello,


The documentation for os-release (https://www.freedesktop.org/software/systemd/man/os-release.html) only briefly mentions major release, but indicates that VERSION_ID is where that should come from.

Both Debian and AlmaLinux have sensible values for VERSION_ID:

VERSION_ID="11"

VERSION_ID="9.2"


You may want to contact the upstream for CloudLinux dracut to see what their reasons behind "049-223.git20230119.el8" for VERSION_ID were and if they can consider changing this.



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0bf82a96-117c-4d05-88be-4010a37e51d4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages