Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2025437 - New OS created due to facts mismatch for operatingsystem for RHSM, Puppet and Ansible
Summary: New OS created due to facts mismatch for operatingsystem for RHSM, Puppet and...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.11.0
Assignee: Marek Hulan
QA Contact: Ondrej Gajdusek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-22 08:23 UTC by Stefan Meyer
Modified: 2022-07-05 14:30 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2043706 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:30:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 33980 0 Normal Closed New OS created due to facts mismatch for operatingsystem for RHSM, Puppet and Ansible 2022-02-28 07:44:41 UTC
Foreman Issue Tracker 33981 0 Normal Closed New OS created due to facts mismatch for operatingsystem for RHSM, Puppet and Ansible 2022-01-28 11:19:35 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:30:39 UTC

Description Stefan Meyer 2021-11-22 08:23:36 UTC
Description of problem:
- When rhsm or puppet is sending facts for the OS it updates the facts to the name of "RedHat".
- If an Ansible role is later run it uses "RedHatEnterprise" (RHEL 8) or "RedHatEnterpriseServer" (RHEL 7).

Version-Release number of selected component (if applicable):
- Satellite 6.10.1

How reproducible:
- The OS is created automatically in Hosts =>  Operating Systems
- To check for the name go into each OS and check the Name field

Steps to Reproduce:
1. Register RHEl 8 client to Satellite
2. Run "subscription-manager facts --update"
3. The OS should be set to an OS which Name is "RedHat"
4. Run any playbook on the client that gathers facts
5. The OS for the client is updated to an OS that has "RedHatEnterprise" in its name 


Actual Results:
If the option "ignore_facts_for_operating system" is set to "no" (default) the OS for a client is updated
to the last fact that was reported. This leads to the OS for a client to constantly switch between the
different OS and double the OS entries created than required.

Expected Results:
The Ansible reported fact for OS should be matched to the one that is reported by RHSM or Puppet.


Additional info:
- The fact matcher for Ansible seems to use ansible_lsb.id which delivers different values

Comment 3 Marek Hulan 2021-11-23 13:12:11 UTC
Created redmine issue https://projects.theforeman.org/issues/33980 from this bug

Comment 4 Brad Buckingham 2021-12-07 15:46:15 UTC
Hi Marek,

Should https://projects.theforeman.org/issues/33981 also be linked to this bugzilla?

Thanks!

Comment 5 Ron Lavi 2021-12-08 08:48:50 UTC
iiuc https://projects.theforeman.org/issues/33980 fixes this for 6.10 as part of foreman_ansible and it's merged
and https://projects.theforeman.org/issues/33981 fixes it for 7.0 in Foreman as the parsing moved to core.

Comment 10 Ondrej Gajdusek 2022-02-21 14:25:42 UTC
VERIFIED
@Satellite 7.0 snap 9
foreman-3.1.1.4-1.el8sat.noarch

I observed the described issue on Satellite 6.10.2 with tfm-rubygem-foreman_ansible-6.3.4-1.el7sat.noarch installed.

First I was unable to reproduce it, but later on, I found out that redhat-lsb-core package needs to be installed on the host in order to get the ansible_lsb fact non-empty.

Having the following system
$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	RedHatEnterpriseServer
Description:	Red Hat Enterprise Linux Server release 7.9 (Maipo)
Release:	7.9
Codename:	Maipo

and running Ansible roles on it caused "Red Hat Enterprise Linux Server release 7.9 (Maipo)" OS to be created.

Similar thing happens for RHEL 8.
$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	RedHatEnterprise
Description:	Red Hat Enterprise Linux release 8.5 (Ootpa)
Release:	8.5
Codename:	Ootpa

creates "Red Hat Enterprise Linux release 8.5 (Ootpa)" OS.

This behavior is no longer observed on Satellite 7.0.

Additional info:
BZ2056582 was created to track the same behavior on different OS variants.

Comment 17 errata-xmlrpc 2022-07-05 14:30:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: Satellite 6.11 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5498


Note You need to log in before you can comment on or make changes to this bug.