Bug 1155704 - Operating System Property of Host is reset by puppet fact, breaking "rebuild".
Summary: Operating System Property of Host is reset by puppet fact, breaking "rebuild".
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.4
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Sanket Jagtap
URL:
Whiteboard:
: 1175783 1261667 1399315 (view as bug list)
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker 1214527 1267521 1287901 1426373
TreeView+ depends on / blocked
 
Reported: 2014-10-22 16:29 UTC by Harald Jensås
Modified: 2021-12-10 14:26 UTC (History)
32 users (show)

Fixed In Version: foreman-1.11.0.72-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1426373 (view as bug list)
Environment:
Last Closed: 2017-05-01 13:51:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6006 0 Normal Closed OS facts should not overwrite the OS selected to provision with 2020-10-29 12:55:27 UTC
Red Hat Product Errata RHBA-2017:1191 0 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 17:49:42 UTC

Description Harald Jensås 2014-10-22 16:29:20 UTC
Description of problem:
Puppet fact change the "Operating System" property of a host if it is not the same as selected when provisioning the host.

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


How reproducible:
Easy.

Steps to Reproduce:
1. Create an Operating System.
hammer> os info --id=4
Id:                 4
Full name:          RedHat 6
Release name:       
Family:             Redhat
Name:               RedHat
Major version:      6
Minor version:      
Partition tables:   
    Kickstart default
    Kicstart RHS3
Default templates:  
    Kickstart default PXELinux (PXELinux)
    STHLAB Kickstart Default (provision)
Architectures:      
    x86_64
Installation media: 
    STHLMLAB/Library/Red_Hat_6_Server_Kickstart_x86_64_6_5
    STHLMLAB/Library/Red_Hat_6_Server_Kickstart_x86_64_6Server
Templates:          
    Kickstart default PXELinux (PXELinux)
    Satellite Kickstart Default (provision)
    STHLAB Kickstart Default (provision)
Parameters:

2. Create Content View and Activation key etc. with RHEL 6Server repos.
hammer> content-view info --organization-id=3 --id 23
ID:                 23
Name:               RHEL6Server
Label:              RHEL6Server
Composite:          
Description:        
Content Host Count: 
Organization:       Stockholm LAB
Repositories:       
 1) ID:    598
    Name:  Red Hat Enterprise Linux 6 Server Kickstart x86_64 6Server
    Label: Red_Hat_Enterprise_Linux_6_Server_Kickstart_x86_64_6Server
 2) ID:    597
    Name:  Red Hat Enterprise Linux 6 Server - RH Common RPMs x86_64 6Server
    Label: Red_Hat_Enterprise_Linux_6_Server_-_RH_Common_RPMs_x86_64_6Server
 3) ID:    599
    Name:  Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server
    Label: Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server
 4) ID:    811
    Name:  Red Hat Enterprise Linux Load Balancer for RHEL 6 Server - Fastrack RPMs x86_64
    Label: Red_Hat_Enterprise_Linux_Load_Balancer_for_RHEL_6_Server_-_Fastrack_RPMs_x86_64
 5) ID:    810
    Name:  Red Hat Enterprise Linux Load Balancer for RHEL 6 Server RPMs x86_64 6Server
    Label: Red_Hat_Enterprise_Linux_Load_Balancer_for_RHEL_6_Server_RPMs_x86_64_6Server
 6) ID:    624
    Name:  Red Hat Enterprise Linux Scalable File System for RHEL 6 Server RPMs x86_64 6Server
    Label: Red_Hat_Enterprise_Linux_Scalable_File_System_for_RHEL_6_Server_RPMs_x86_64_6Server

3. Provision a host using the RHEL6Server ContentView, RedHat 6 OS and Red_Hat_6_Server_Kickstart_x86_64_6Server installation media.

Actual results:
During provisioning the "Operating System" Property of the host is "RedHat 6", the host is provisioned fine. 
Once the puppet is run the "Operating System" Property is changed to "Red Hat 6.6" and a new OS "Red Hat 6.6" is addded.

hammer> os info --id=8
Id:                 8
Full name:          RedHat 6.6
Release name:       
Family:             Redhat
Name:               RedHat
Major version:      6
Minor version:      6
Partition tables:   

Default templates:  
    STHLAB Kickstart Default (provision)
    Kickstart default PXELinux (PXELinux)
Architectures:      

Installation media: 

Templates:          

Parameters:

Problem is that the new OS is not associated with any partition tables, templates etc. The result of this is that enabling "Rebuild" of the host does not work.


Expected results:
Properties for provisioning should not change based on a Puppet Fact. One should be able to rebuild the host. 

RHEL 6 is RHEL 6.x, it should be possible to have one set of partition tables and provisioning tables for all RHEL 6.x hosts.

Additional info:

Comment 1 RHEL Program Management 2014-10-22 16:42:56 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Dominic Cleal 2014-10-23 14:27:42 UTC
Could you confirm if the first OS was auto-created when you synchronised the Red Hat repositories, or if you manually created it?

Comment 4 Harald Jensås 2014-10-28 08:01:54 UTC
The "RedHat 6" Operating System was manually created.

--
My observation is that the OS is not created when synchronizing the Red Hat Repos at all. At least "RedHat 6.6" was not auto-created when nightly syncs of "6Server" pulled in RHEL 6.6 when it was released.

Comment 7 Marek Hulan 2015-06-24 08:36:49 UTC
We currently don't have better workaround than assign all partition tables and provisioning templates for newly created OS so it can be used for provisioning or manually change the OS to original value before rebuild.

Comment 14 Ohad Levy 2016-03-16 12:19:20 UTC
implementation is probably identical to BZ1261667

Comment 17 Marek Hulan 2016-12-01 07:15:30 UTC
*** Bug 1399315 has been marked as a duplicate of this bug. ***

Comment 18 Marek Hulan 2016-12-02 17:20:37 UTC
Linked upstream issue adds a setting that would disable OS updating based on facts. We can later improve it and separate provisioned OS and reported OS.

Comment 19 Bryan Kearney 2016-12-09 09:16:13 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/6006 has been resolved.

Comment 20 Brad Buckingham 2016-12-09 16:06:14 UTC
*** Bug 1261667 has been marked as a duplicate of this bug. ***

Comment 26 Steven Mercurio 2017-02-10 22:54:12 UTC
Is this something I can import into my 6.2.6 install?  This definately is my issue!

Comment 27 Tomer Brisker 2017-02-12 08:54:02 UTC
Steven - this is currently targeted at the 6.2.9 release. If you need this earlier, please request a hotfix via your case so that we can provide you with a supported patch that matches your version.

Comment 31 Satellite Program 2017-02-23 21:08:00 UTC
Please add verifications steps for this bug to help QE verify

Comment 32 Tomer Brisker 2017-02-26 07:18:37 UTC
Verification steps:

1. Create a new host entry using the fact importer (sat.example.com/api/v2/hosts/facts).
2. Check that there is a new setting added "Ignore facts for operating system", and set it to true.
3. upload the same fact from step 1, but with a change in all the operating system fields to a different OS or version.
4. Verify that the host OS isn't updated.
5. Set the setting in step 2 to false.
6. Upload same modified facts from step 3.
7. Verify that the host OS is updated.

Thank you.

Comment 42 Sanket Jagtap 2017-03-30 10:20:30 UTC
Build : Satellite 6.2.9 snap1

Steps:
1. Provisioned a host.
2. Setting "Ignore facts for operating system" to True
3. Updated the host os as rhel 7
4. Ran puppet agent -t on host , the os didn't change 
5. Setting the "Ignore facts for operating system" to False
6. Ran puppet agent on the host , the operating system was updated to RHEL 7.3 and also a new RHEL 7.3 os was created into operating system section 

The New Setting "Ignore facts for operating system" is working as expected.

Comment 46 Lukas Zapletal 2017-04-25 15:34:53 UTC
This flag is important for customers who runs both RHEL Server and Workstation, because everytime Synced content is flipped from Server to Workstation and back, foreman-proxy running on TFTP Capsule will redownload kernel and image because the naming convention is per OS not per OS+Synced content:

/var/lib/tftpboot/boot/RedHat-7.3-x86_64-vmlinuz
/var/lib/tftpboot/boot/RedHat-7.3-x86_64-initrd.img

This leads to bug, we use "wget -c" to download the files and this "continue" flag will eventually corrupt the files because it only appends missing bytes from remote server, it does not work like "rsync". For this customers, the only way to workaround this is to prevent Puppet from switching OS back to "RedHat X.Y".

Comment 48 errata-xmlrpc 2017-05-01 13:51:46 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, 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/RHBA-2017:1191

Comment 49 Karl Abbott 2017-07-12 13:19:41 UTC
*** Bug 1175783 has been marked as a duplicate of this bug. ***


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