Os name for sles 12 is not correct in 5.0 inventories
When running a scenario on a sles12 machine with RTF, the initial tests contain an inventory sample test.
It fails because the OS_NAME is '%s' which is for sure not wanted.
It was seen on a 5.0.4
<HARDWARE> <ARCHNAME>x86_64-linux-thread-multi</ARCHNAME> <CHASSIS_TYPE>Other</CHASSIS_TYPE> <CHECKSUM>131071</CHECKSUM> <DATELASTLOGGEDUSER>Wed Dec 12 16:34</DATELASTLOGGEDUSER> <DNS>184.108.40.206/220.127.116.11</DNS> <ETIME>1</ETIME> <IPADDR>10.0.2.15/192.168.41.2</IPADDR> <LASTLOGGEDUSER>vagrant</LASTLOGGEDUSER> <MEMORY>1481</MEMORY> <NAME>server</NAME> <OSCOMMENTS>#1 SMP Tue May 29 21:04:44 UTC 2018 (cd0437b)</OSCOMMENTS> <OSNAME>%s</OSNAME> <OSVERSION>4.12.14-23-default</OSVERSION> <PROCESSORN>1</PROCESSORN> <PROCESSORT>Intel Core Processor (Haswell, no TSX)</PROCESSORT> <UUID>3DB5964D-76A0-4374-B86F-9A2CC09CE8F9</UUID> <VMSYSTEM>VirtualBox</VMSYSTEM> </HARDWARE>
#2 Updated by Félix DALLIDET 3 months ago
- Status changed from In progress to Pending technical review
- Assignee changed from Félix DALLIDET to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-packages/pull/1739
#5 Updated by Félix DALLIDET 3 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|4643369ea6d7ad02188bc0494d17ecb38780614e.
#7 Updated by Vincent MEMBRÉ 2 months ago
- Status changed from Pending release to Released
#8 Updated by Félix DALLIDET about 2 months ago
To give more details: starting from sles15, sles will only support /etc/os-release to identify the current os version.
See the doc of sles12 https://www.suse.com/releasenotes/x86_64/SUSE-SLES/12/#fate-316268.
I added support for /etc/os-release in our fusion inventory agent, following the current official fusion inventory agent.
But this seems to break compatibility on systems where inventory was previously based on a specific file like /etc/redhat-release but also have an /etc/os-release since the name, versions, etc... can be specified in different manners.
#10 Updated by Nicolas CHARLES about 2 months ago
NAME="SLES" VERSION="12-SP1" VERSION_ID="12.1" PRETTY_NAME="SUSE Linux Enterprise Server 12 SP1" ID="sles" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:12:sp1"
SUSE Linux Enterprise Server 12 (x86_64) VERSION = 12 PATCHLEVEL = 1 # This file is deprecated and will be removed in a future service pack or release. # Please check /etc/os-release for details about this release.
on Rudder pre-5.0.4, it returns SuSE, version 12.1
on Rudder post-5.0.4, it returns SUSE Linux Enterprise Server 12 SP1 - VERSION12-SP1
#11 Updated by Félix DALLIDET about 2 months ago
On SLES 15:
NAME="SLES" VERSION="15" VERSION_ID="15" PRETTY_NAME="SUSE Linux Enterprise Server 15" ID="sles" ID_LIKE="suse" ANSI_COLOR="0;32" CPE_NAME="cpe:/o:suse:sles:15"
Only another file, /etc/SUSE-brand
SLE VERSION = 15
if lsb_release is installed:
server:/opt/rudder/lib/perl5/FusionInventory/Agent/Task/Inventory/Linux/Distro # lsb_release -a LSB Version: n/a Distributor ID: SUSE Description: SUSE Linux Enterprise Server 15 Release: 15 Codename: n/a