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:
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.
Could you confirm if the first OS was auto-created when you synchronised the Red Hat repositories, or if you manually created it?
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.
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.
implementation is probably identical to BZ1261667
*** Bug 1399315 has been marked as a duplicate of this bug. ***
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.
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/6006 has been resolved.
*** Bug 1261667 has been marked as a duplicate of this bug. ***
Is this something I can import into my 6.2.6 install? This definately is my issue!
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.
Please add verifications steps for this bug to help QE verify
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.
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.
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".
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
*** Bug 1175783 has been marked as a duplicate of this bug. ***