Bug 1319283

Summary: Puppet Master/CA fields are not inherited for discovered hosts via auto-provisioning
Product: Red Hat Satellite Reporter: sthirugn <sthirugn>
Component: Discovery PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bkearney, dmoessne, jcallaha, jmontleo, jsherril, ohadlevy, parmstro, sghai, sthirugn, zhunting
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9784
Whiteboard:
Fixed In Version: tfm-rubygem-foreman_discovery-5.0.0.9-1 foreman-1.11.0.55-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1394363 (view as bug list) Environment:
Last Closed: 2016-12-12 17:11:14 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:
Bug Depends On: 1364544, 1367136, 1394364    
Bug Blocks: 1212602, 1394363    
Attachments:
Description Flags
Two required patches
none
Two required patches
none
puppet Master/CA fileds are inherited for discovered host via auto-prov
none
on reviewing provisioning template of provisioned discovered host, it correctly renders the puppet none

Description sthirugn@redhat.com 2016-03-18 17:22:53 UTC
Created attachment 1137828 [details]
hostgroup

Description of problem:
puppet is not installed in discovered hosts although the hostgroup has puppet settings configured

Version-Release number of selected component (if applicable):
Satellite 6.2.0-beta-snap4

How reproducible:
Always

Steps to Reproduce:
1.Setup a hostgroup and configure all required settings including PuppetCA, Puppet Master
2. Automatically discover/provision a host

Actual results:
Host is discovered and provisioned successfully.  But puppet is not installed in the host so it is not reporting to satellite.

Expected results:
Puppet should be automatically installed (when setup in hostgroup) and the host should start reporting automatically.

Additional info:

Comment 1 sthirugn@redhat.com 2016-03-18 17:24:19 UTC
Created attachment 1137829 [details]
provisioned host

Comment 3 Lukas Zapletal 2016-03-21 10:57:57 UTC
It's because Puppet Master flag is not inherited from hostgroup, therefore it's not installed (when it's blank).

Comment 4 Lukas Zapletal 2016-03-21 11:15:00 UTC
Are you doing auto-provisioning or provisioning via the interactive form?

Comment 5 sthirugn@redhat.com 2016-03-21 14:36:20 UTC
I tried two auto provisioning scenarios, both failed for this bug:

1. Auto provision is disabled in satellite settings.  Trigger provisioning from virt-manager.  I went to Satellite -> Discovered Hosts and manually triggered auto provision. After provision, host did not have puppet configured.
2. Auto provision is enabled and discovery rules are setup in satellite.  Trigger provisioning from virt-manager.  The discovery rules worked and provision triggered fine. Again after provision, host did not have puppet configured.

Comment 6 Jason Montleon 2016-03-29 12:42:15 UTC
I am seeing this now with RHCI on Satellite 6.2 as well.

Comment 7 Jason Montleon 2016-04-04 18:11:36 UTC
Commented on the upstream PR's. I am not having any luck with them. They're breaking viewing Hostgroups and I'm still not inheriting values on converting hosts.

Comment 10 Justin Sherrill 2016-05-23 12:37:32 UTC
Proposing for 6.2.z, this makes discovery nearly useless for anyone using puppet, also some RHCI concern

Comment 14 Bryan Kearney 2016-06-19 20:13:11 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9784 has been closed

Comment 17 Lukas Zapletal 2016-06-20 13:58:31 UTC
Created attachment 1169928 [details]
Two required patches

Comment 18 Lukas Zapletal 2016-06-20 13:58:54 UTC
Created attachment 1169929 [details]
Two required patches

Comment 19 Lukas Zapletal 2016-06-20 14:11:15 UTC
Ignore comments 16, 17 and 18. The attached patch is only for UI provisioning. This bug is all about auto-provisioning. I am editing the subject to avoid confusion, we may backport the UI patch at some point too, but we need to fix auto-provisioning first.

Comment 21 Bryan Kearney 2016-07-19 22:04:08 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9784 has been closed

Comment 22 sthirugn@redhat.com 2016-08-05 16:39:51 UTC
Blocked with https://bugzilla.redhat.com/show_bug.cgi?id=1364544

Comment 23 sthirugn@redhat.com 2016-08-12 17:47:27 UTC
Failed.  I tried the exact same steps as mentioned in the bug description. The Puppet Master/CA fields are still not inherited which causes puppet not to be installed.

Verified in satellite-6.2.0-21.2.el7sat.noarch

Comment 29 Lukas Zapletal 2016-10-03 13:37:44 UTC
*** Bug 1379108 has been marked as a duplicate of this bug. ***

Comment 33 Lukas Zapletal 2016-11-03 12:05:36 UTC
HOTFIX for this bug is in different BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=1367136

Comment 34 Sachin Ghai 2016-12-02 11:01:05 UTC
Verified with Sat6.2.5 snap1

To test the issue:

1 created a hostgroup with Puppet Master/CA fields associated to hostgroup
2 later defined a discovery rule and associated the hg created in above step2
3. Enabled auto-provisioning
4. discovered a host and auto-provosioning started.


Once host is provisioned, I see that both fields are correctly associated to provisioned host (checked from edit host page). Please see the attachment.

Also, I can see puppet correctly installed when I reviewed the provisioning template.  Please see the attachment.

Comment 35 Sachin Ghai 2016-12-02 11:02:42 UTC
Created attachment 1227285 [details]
puppet Master/CA fileds are inherited for discovered host via auto-prov

Comment 36 Sachin Ghai 2016-12-02 11:05:31 UTC
Created attachment 1227287 [details]
on reviewing provisioning template of provisioned discovered host, it correctly renders the puppet

Comment 37 Sachin Ghai 2016-12-02 12:45:21 UTC
Please note that when we manually associate a hostgroup with discovered host for provisioning then puppet CA/master fields doesn't auto-populate. for this bz is already there: https://bugzilla.redhat.com/show_bug.cgi?id=1370022#c7

Comment 39 errata-xmlrpc 2016-12-12 17:11:14 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-2016:2940