Bug 1978683

Summary: [global registration] - puppet configuration are not inherited to host from host-group while global registration
Product: Red Hat Satellite Reporter: Omkar Khatavkar <okhatavk>
Component: RegistrationAssignee: Leos Stejskal <lstejska>
Status: CLOSED ERRATA QA Contact: Shweta Singh <shwsingh>
Severity: high Docs Contact:
Priority: high    
Version: 6.10.0CC: dwojewod, lstejska, rlavi, shwsingh, zuansorg
Target Milestone: 6.13.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-03 13:20:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Omkar Khatavkar 2021-07-02 13:31:54 UTC
Description of problem:
[global registration] - puppet configuration are not inherited to host from host-group while global registration  

Version-Release number of selected component (if applicable):
Satellite 6.10 Snap 7

How reproducible:
always 


Steps to Reproduce:
1.Sync the redhat reositories, create contentview and activation-key 
2.import puppet modules 
3.create the host group and update the details about the puppet configuration  
4.Register the host using global registration  

Actual results:
puppet configurations is not set on the host, /etc/puppetlabs/puppet/puppet.conf file also not set on the host  

Expected results:
puppet configurations should be set on the host

Additional info:

Comment 1 Marek Hulan 2021-08-03 13:46:50 UTC
Leos, isn't this resolved by https://projects.theforeman.org/issues/32457 ? If so, please link the two, so the patch can be backported properly.

Comment 2 Leos Stejskal 2021-08-03 14:05:14 UTC
Yes you are right, it should be fixed now. From Redmine I can see that it have been back-ported to Foreman 2.5.1,
therefore it should be fixed in current 6.10 snap.

Comment 4 Leos Stejskal 2021-08-05 13:03:35 UTC
Hi,
as the output says: "There are no enabled repos."
Registration process ended after the installation of insights-client failed.

There are two ways how to fix it:
1 - Disable installation of insights (Go to "Configure > Global parameters" and set `host_registration_insights` to false)
2 - enable and sync repo required for successful insights-client installation

Step 1 is easier and faster and won't have any affect your test.
And you should have installed puppet on the registered machine

Comment 6 Leos Stejskal 2021-08-06 07:58:16 UTC
It looks like you are re-registering same host which has `host_registration_insights` param set to `true` from previous registration.
This is known issue fixed in latest snap [0].
Try to delete registered host in Satellite & register it again with `host_registration_insights=false`

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1967066

Comment 9 Leos Stejskal 2021-08-06 12:00:10 UTC
Hi, I tried it and I confirm that the issue is still present in 6.10 SNAP 11, moving back to NEW.

Comment 10 Leos Stejskal 2022-01-12 10:52:19 UTC
Created redmine issue https://projects.theforeman.org/issues/34248 from this bug

Comment 12 Leos Stejskal 2022-07-31 08:07:33 UTC
Note: Still reproducible on the latest develop.
In `host_puppet_server` template macro we check if the host have `puppet_server` and if not then we look for the value of host_param('puppet_server').

The problem is that `puppet_server` parameter configured on the host group level returns in `host_puppet_server` macro empty string.

Comment 13 Bryan Kearney 2022-08-03 16:03:46 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/35306 has been resolved.

Comment 14 Ron Lavi 2022-08-04 07:27:25 UTC
*** Bug 2106782 has been marked as a duplicate of this bug. ***

Comment 18 Shweta Singh 2023-01-23 10:47:25 UTC
Verified.

Tested on Satellite 6.13.0 Snap 5.0

Steps:
1. Sync the RedHat kickstart repositories, create content view and activation-key.
2. Create the host group and update the details about the puppet config where using host params like enable-puppet7, puppet_ca_server, puppet_server.
3. Provisioning a host which has hostgroup assigned, and update root password.
4. Verify provisioned host for puppet config which will be inherited from host group in /etc/puppetlabs/puppet/puppet.conf.

Observation:
Puppet config and puppet configuration set on host group are inherited to host.

Comment 23 errata-xmlrpc 2023-05-03 13:20:33 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 (Important: Satellite 6.13 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-2023:2097