You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that none of the normal search strategies work:
$ which lsb_release/usr/bin/which: no lsb_release in (...)
$ ls /etc/*releasels: cannot access /etc/*release: No such file or directory
$ ls /etc/*versionls: cannot access /etc/*version: No such file or directory
$ uname -aLinux web.illinois.edu 3.10.0-962.3.2.lve1.5.24.9.el7.x86_64 #1 SMP Wed Feb 13 08:24:50 EST 2019 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/versionLinux version 3.10.0-962.3.2.lve1.5.24.9.el7.x86_64 (mockbuild@buildfarm02.cloudlinux.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Wed Feb 13 08:24:50 EST 2019
The only strategy that seems to work is:
$ hostnamectl Static hostname: web.illinois.edu Icon name: computer-vm Chassis: vm Boot ID: 5b5b8c522ccd4974808f192aea001491 Virtualization: kvm Operating System: CloudLinux 7.6 (Vladimir Lyakhov) CPE OS Name: cpe:/o:cloudlinux:cloudlinux:7.6:GA:server Kernel: Linux 3.10.0-962.3.2.lve1.5.24.9.el7.x86_64 Architecture: x86-64
We may need to add another search strategy to support this type of VM.
So we are looking for OperatingSystemPrettyName and OperatingSystemCPEName D-Bus attributes (see sources).
If we can manage to fetch them without reading from the bus (maybe they are provisioned on the file system too ?), we could then implement a trivial CPE parser and extract information from there.
Thanks for trying this. hostnamectl --json=short could make this straightforward.
Maybe we are missing something, and others got a better idea ?
Another way would be to read from D-Bus directly... A Python dependency is required though.
See you 👋
Coming to join the conversation here as my issue #368 was basically a duplicate.
Happy to help test any potential solutions on my GoDaddy CloudLinux 8 server. As discussed in my issue hostnamectl is not available in that environment.
We can start by checking whether the above "D-Bus way" works in your environment too.
bustctl is another systemd binary but if you have it, could you run : busctl get-property org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.hostname1 OperatingSystemPrettyName ?
If it isn't, could you give a try to dbus-send --system --print-reply --dest=org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.DBus.Properties.Get string:org.freedesktop.hostname1 string:OperatingSystemPrettyName ?
We can start by checking whether the above "D-Bus way" works in your environment too.
bustctl is another systemd binary but if you have it, could you run : busctl get-property org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.hostname1 OperatingSystemPrettyName ? If it isn't, could you give a try to dbus-send --system --print-reply --dest=org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.DBus.Properties.Get string:org.freedesktop.hostname1 string:OperatingSystemPrettyName ?
What a shame... I wonder whether we should opt for a simpler approach like checking for /usr/sbin/cloudlinux-selector presence, and hope for upstream to properly include an os-release (or any other indicative) file. What do you think ? 🙄
Note : this wouldn't give us the version, nor the "pretty name".
EDIT : if we wanna stick to the D-Bus way (and if we cannot manage to directly retrieve what D-Bus queries), we have to come up with a first Python script to dialog with D-Bus if you don't have any system tool to do so 🤡
@HorlogeSkynet I think it would be wise to adopt an official policy of only fixing bugs for versions of OSes that are still supported. That can easily end a lot of debates.
I think it would be wise to adopt an official policy of only fixing bugs for versions of OSes that are still supported. That can easily end a lot of debates.
I second that.
prefer redirecting to upstream distributions patches, to honor existing datasources and their format
downstream (simple) patches for non-EOL distributions
For reference, this issues was partially related to #262.
Activity
HorlogeSkynet commentedon Feb 5, 2022
Hey @adamjstewart, do you know where the CPE is provisioned in such an environment ?
Thanks, bye 👋
adamjstewart commentedon Feb 5, 2022
What is a CPE?
HorlogeSkynet commentedon Feb 6, 2022
Common Platform Enumeration, look at
hostnamectloutput.I'll do some research on my own soon.
adamjstewart commentedon Feb 6, 2022
Hostnamectl output is attached above. Is there something else you need from me?
HorlogeSkynet commentedon Feb 6, 2022
So we are looking for
OperatingSystemPrettyNameandOperatingSystemCPENameD-Bus attributes (see sources).If we can manage to fetch them without reading from the bus (maybe they are provisioned on the file system too ?), we could then implement a trivial CPE parser and extract information from there.
adamjstewart commentedon Feb 6, 2022
I recursively grepped the entire OS for those strings but didn't find anything useful. Maybe it would be easier to build a
hostnamectlparser?HorlogeSkynet commentedon Feb 6, 2022
Thanks for trying this.
hostnamectl --json=shortcould make this straightforward.Maybe we are missing something, and others got a better idea ?
Another way would be to read from D-Bus directly... A Python dependency is required though.
See you 👋
adamjstewart commentedon Feb 6, 2022
This version of
hostnamectldoesn't have a--jsonoption.HorlogeSkynet commentedon Feb 8, 2022
So
re.searcharoundhostnamectloutput, or something like dcar if we want to stop calling binaries directly in the future.NebularNerd commentedon Aug 20, 2024
Coming to join the conversation here as my issue #368 was basically a duplicate.
Happy to help test any potential solutions on my GoDaddy CloudLinux 8 server. As discussed in my issue
hostnamectlis not available in that environment.HorlogeSkynet commentedon Aug 20, 2024
Hello again @NebularNerd !
We can start by checking whether the above "D-Bus way" works in your environment too.
bustctlis another systemd binary but if you have it, could you run :busctl get-property org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.hostname1 OperatingSystemPrettyName?If it isn't, could you give a try to
dbus-send --system --print-reply --dest=org.freedesktop.hostname1 /org/freedesktop/hostname1 org.freedesktop.DBus.Properties.Get string:org.freedesktop.hostname1 string:OperatingSystemPrettyName?Thanks ! Bye 👋
NebularNerd commentedon Aug 20, 2024
Hi @HorlogeSkynet 🙂
bustctlanddbus-sendare a bust, both are not availableunameoutput not much else exists for this platform.HorlogeSkynet commentedon Aug 20, 2024
What a shame... I wonder whether we should opt for a simpler approach like checking for
/usr/sbin/cloudlinux-selectorpresence, and hope for upstream to properly include an os-release (or any other indicative) file. What do you think ? 🙄Note : this wouldn't give us the version, nor the "pretty name".
EDIT : if we wanna stick to the D-Bus way (and if we cannot manage to directly retrieve what D-Bus queries), we have to come up with a first Python script to dialog with D-Bus if you don't have any system tool to do so 🤡
9 remaining items
HorlogeSkynet commentedon Aug 22, 2024
Hello @NebularNerd ! Could you please take a look/give a try to #369 RFC ? 🙂
Thanks bye 👋
NebularNerd commentedon Aug 22, 2024
Tested #369 on the GoDaddy 🥔 server and we have a winner 🎉
HorlogeSkynet commentedon Aug 22, 2024
Awesome, we only have to wait for @python-distro/maintainers to properly review #369 then 🙂
Many thanks for your time and resources Andy, see you 👋
Add support for CloudLinux VM missing os-release and /etc/redhat-release
Add support for CloudLinux VM missing os-release and /etc/redhat-release
Add support for CloudLinux VM missing os-release and /etc/redhat-release
Add support for CloudLinux VM missing os-release and /etc/redhat-release
Add support for CloudLinux VM missing os-release and /etc/redhat-release
Add support for CloudLinux VM missing os-release and /etc/redhat-release
adamjstewart commentedon Nov 10, 2025
CloudLinux VM 6 is dead, long live CloudLinux VM 9: https://cloudlinux.zendesk.com/hc/en-us/articles/5743930542620-CloudLinux-OS-life-cycle
adamjstewart commentedon Nov 10, 2025
@HorlogeSkynet I think it would be wise to adopt an official policy of only fixing bugs for versions of OSes that are still supported. That can easily end a lot of debates.
HorlogeSkynet commentedon Nov 10, 2025
I second that.
For reference, this issues was partially related to #262.
Add `systemd-hostnamed` fallback for missing os-release