Jira (FACT-3180) Facter mixes up OracleLinux and Redhat

41 views
Skip to first unread message

Bernhard Suttner (Jira)

unread,
Jan 26, 2023, 6:09:02 AM1/26/23
to puppe...@googlegroups.com
Bernhard Suttner created an issue
 
Facter / Bug FACT-3180
Facter mixes up OracleLinux and Redhat
Issue Type: Bug Bug
Affects Versions: FACT 4.2.14
Assignee: Unassigned
Components: Facter 4
Created: 2023/01/26 3:08 AM
Priority: Major Major
Reporter: Bernhard Suttner

On Oracle 8.7, facter mixes up OracleLinux and Redhat data:

os:
  architecture: x86_64
  distro:
    codename: Ootpa
    description: "Red Hat Enterprise Linux release 8.7 (Ootpa)"
    id: "RedHatEnterprise"
    release:
      full: '8.7'
      major: '8'
      minor: '7'
  family: RedHat
  hardware: x86_64
  name: "OracleLinux"
  release:
    full: '8.7'
    major: '8'
    minor: '7'
 

I would expect the following:

In case of a OracleLinux system (detected by /etc/os-release) it should not read the /etc/redhat-release file so that the facts are not mixed up. 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)
Atlassian logo

Tony Vu (Jira)

unread,
Jan 31, 2023, 4:38:03 PM1/31/23
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Team: Phoenix

Josh Cooper (Jira)

unread,
Feb 24, 2023, 2:29:03 PM2/24/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3180
 
Re: Facter mixes up OracleLinux and Redhat

Bernhard Suttner  did facter 3 handle this differently?

Josh Cooper (Jira)

unread,
Apr 2, 2023, 9:02:02 PM4/2/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Epic Link: PUP-11659

Josh Cooper (Jira)

unread,
Apr 3, 2023, 11:54:02 AM4/3/23
to puppe...@googlegroups.com
Josh Cooper commented on Bug FACT-3180
 
Re: Facter mixes up OracleLinux and Redhat

Facter 3 without lsb_release (which is the default):

[root@b07ba722aff9 /]# /opt/puppetlabs/puppet/bin/facter --version 
3.14.24 (commit 91ed8a2de5c9d686345859fe12ea2914415758f0)
...
[root@b07ba722aff9 /]# /opt/puppetlabs/puppet/bin/facter os --debug
...
2023-04-03 15:48:53.301908 DEBUG leatherman.execution:93 - executing command: lsb_release -a
2023-04-03 15:48:53.301934 DEBUG leatherman.execution:460 - lsb_release was not found on the PATH.
2023-04-03 15:48:53.302292 DEBUG puppetlabs.facter - fact "osfamily" has resolved to "RedHat".
2023-04-03 15:48:53.302312 DEBUG puppetlabs.facter - fact "operatingsystemmajrelease" has resolved to "8".
2023-04-03 15:48:53.302329 DEBUG puppetlabs.facter - fact "operatingsystemrelease" has resolved to "8.7".
2023-04-03 15:48:53.302345 DEBUG puppetlabs.facter - fact "hardwaremodel" has resolved to "x86_64".
2023-04-03 15:48:53.302362 DEBUG puppetlabs.facter - fact "architecture" has resolved to "x86_64".
2023-04-03 15:48:53.302379 DEBUG puppetlabs.facter - fact "operatingsystem" has resolved to "OracleLinux".
2023-04-03 15:48:53.302396 DEBUG puppetlabs.facter - fact "selinux" has resolved to false.
...
{
  architecture => "x86_64",
  family => "RedHat",
  hardware => "x86_64",
  name => "OracleLinux",
  release => {
    full => "8.7",
    major => "8",
    minor => "7"
  },
  selinux => {
    enabled => false
  }
}
 

Facter 3 with lsb_release:

[root@b07ba722aff9 /]# /opt/puppetlabs/puppet/bin/facter os --debug
...
2023-04-03 15:51:39.284108 DEBUG leatherman.execution:93 - executing command: /usr/bin/lsb_release -a
2023-04-03 15:51:39.290058 DEBUG | - LSB Version:    :core-4.1-amd64:core-4.1-noarch
2023-04-03 15:51:39.292367 DEBUG | - Distributor ID:    OracleServer
2023-04-03 15:51:39.292389 DEBUG | - Description:    Oracle Linux Server release 8.7
2023-04-03 15:51:39.293553 DEBUG | - Release:    8.7
2023-04-03 15:51:39.295682 DEBUG | - Codename:    n/a
2023-04-03 15:51:39.295827 DEBUG leatherman.execution:610 - process exited with status code 0.
2023-04-03 15:51:39.296143 DEBUG puppetlabs.facter - fact "osfamily" has resolved to "RedHat".
2023-04-03 15:51:39.296162 DEBUG puppetlabs.facter - fact "operatingsystemmajrelease" has resolved to "8".
2023-04-03 15:51:39.296181 DEBUG puppetlabs.facter - fact "operatingsystemrelease" has resolved to "8.7".
2023-04-03 15:51:39.296195 DEBUG puppetlabs.facter - fact "hardwaremodel" has resolved to "x86_64".
2023-04-03 15:51:39.296208 DEBUG puppetlabs.facter - fact "architecture" has resolved to "x86_64".
2023-04-03 15:51:39.296222 DEBUG puppetlabs.facter - fact "lsbdistid" has resolved to "OracleServer".
2023-04-03 15:51:39.296236 DEBUG puppetlabs.facter - fact "lsbdistcodename" has resolved to "n/a".
2023-04-03 15:51:39.296254 DEBUG puppetlabs.facter - fact "lsbdistdescription" has resolved to "Oracle Linux Server release 8.7".
2023-04-03 15:51:39.296270 DEBUG puppetlabs.facter - fact "lsbmajdistrelease" has resolved to "8".
2023-04-03 15:51:39.296287 DEBUG puppetlabs.facter - fact "lsbminordistrelease" has resolved to "7".
2023-04-03 15:51:39.296303 DEBUG puppetlabs.facter - fact "lsbdistrelease" has resolved to "8.7".
2023-04-03 15:51:39.296320 DEBUG puppetlabs.facter - fact "lsbrelease" has resolved to ":core-4.1-amd64:core-4.1-noarch".
2023-04-03 15:51:39.296335 DEBUG puppetlabs.facter - fact "operatingsystem" has resolved to "OracleLinux".
2023-04-03 15:51:39.296352 DEBUG puppetlabs.facter - fact "selinux" has resolved to false.
...
{
  architecture => "x86_64",
  distro => {
    codename => "n/a",
    description => "Oracle Linux Server release 8.7",
    id => "OracleServer",
    release => {
      full => "8.7",
      major => "8",
      minor => "7"
    },
    specification => ":core-4.1-amd64:core-4.1-noarch"
  },
  family => "RedHat",
  hardware => "x86_64",
  name => "OracleLinux",
  release => {
    full => "8.7",
    major => "8",
    minor => "7"
  },
  selinux => {
    enabled => false
  }
} 

Josh Cooper (Jira)

unread,
Apr 3, 2023, 11:55:01 AM4/3/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Labels: regression

Josh Cooper (Jira)

unread,
Apr 24, 2023, 1:18:02 PM4/24/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
On Oracle 8.7, facter mixes up OracleLinux incorrectly sets {{os.distro.description}} and {{os.distro.id}} (specifies Redhat data instead of OracleLinux) :
{code:java}

os:
  architecture: x86_64
  distro:
    codename: Ootpa
    description: "Red Hat Enterprise Linux release 8.7 (Ootpa)"
    id: "RedHatEnterprise"
    release:
      full: '8.7'
      major: '8'
      minor: '7'
  family: RedHat
  hardware: x86_64
  name: "OracleLinux"
  release:
    full: '8.7'
    major: '8'
    minor: '7'
{code}

I would expect the following:

In case of a OracleLinux system (detected by /etc/os-release) it should not read the /etc/redhat-release file so that the facts are not mixed up. 

 

Tony Vu (Jira)

unread,
Apr 26, 2023, 1:46:01 PM4/26/23
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Sprint: Phoenix 2023-05-10

Tony Vu (Jira)

unread,
Apr 26, 2023, 1:46:02 PM4/26/23
to puppe...@googlegroups.com
Tony Vu updated an issue
Change By: Tony Vu
Story Points: 2

Michael Hashizume (Jira)

unread,
Apr 28, 2023, 3:31:03 PM4/28/23
to puppe...@googlegroups.com

Michael Hashizume (Jira)

unread,
Apr 28, 2023, 7:37:01 PM4/28/23
to puppe...@googlegroups.com
Michael Hashizume assigned an issue to Unassigned

Aria Li (Jira)

unread,
May 4, 2023, 12:01:09 PM5/4/23
to puppe...@googlegroups.com
Aria Li assigned an issue to Aria Li
Change By: Aria Li
Assignee: Aria Li

Bernhard Suttner (Jira)

unread,
May 9, 2023, 6:21:03 AM5/9/23
to puppe...@googlegroups.com
Bernhard Suttner commented on Bug FACT-3180
 
Re: Facter mixes up OracleLinux and Redhat

I don't know if facter 3 did this different. 

AFAIK, the "id" should not point to Redhat, if the server is actually a Oracle.

Josh Cooper (Jira)

unread,
May 9, 2023, 2:50:02 PM5/9/23
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
May 9, 2023, 2:50:02 PM5/9/23
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: FACT 4.4.1

Aria Li (Jira)

unread,
May 10, 2023, 1:29:02 PM5/10/23
to puppe...@googlegroups.com
Aria Li updated an issue
Change By: Aria Li
Release Notes: Bug Fix

Christopher Thorn (Jira)

unread,
Jun 8, 2023, 6:56:02 PM6/8/23
to puppe...@googlegroups.com
Christopher Thorn updated an issue
Change By: Christopher Thorn
Release Notes Summary: os.distro.description and os.distro.id facts were previously misreporting Oracle Linux as Redhat Linux, fixed now.
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo

Parker Leach (Jira)

unread,
Jun 14, 2023, 1:08:02 PM6/14/23
to puppe...@googlegroups.com
Parker Leach updated an issue
Change By: Parker Leach
Labels: docs_reviewed regression
Reply all
Reply to author
Forward
0 new messages