Bug 1371093

Summary: capsule installer is removing puppet.conf environment
Product: Red Hat Satellite Reporter: Peter Vreman <peter.vreman>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: jcallaha, stbenjam
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:44:40 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:    
Bug Blocks: 1122832    

Description Peter Vreman 2016-08-29 10:09:28 UTC
Description of problem:
The capsule installer is remvoing the environment setting of puppet. This is a setting that contains the puppet environment as managed by Satellite itself. The capsule feature does not use it and it shall therefor keep the old value.

We manage the puppet.conf to set the environment to the expected KT_ environment so the correct environment is used also during the puppet plugin (facts .rb files) downloading. And also that the user can do a "puppet agent -t -v" runs is without taking care of setting the correct environment.

Below is the output when (re-)running satellite-installer --scenario=capsule

[ WARN 2016-08-29 10:01:15 verbose]  /Stage[main]/Puppet::Config/Concat[/etc/puppet/puppet.conf]/File[/etc/puppet/puppet.conf]/content:
[ INFO 2016-08-29 10:01:15 verbose] --- /etc/puppet/puppet.conf 2016-08-26 12:16:38.107374178 +0000
[ INFO 2016-08-29 10:01:15 verbose] +++ /tmp/puppet-file20160829-13497-sxpk6c-0 2016-08-29 10:01:15.728826271 +0000
[ INFO 2016-08-29 10:01:15 verbose] @@ -55,7 +55,7 @@
[ INFO 2016-08-29 10:01:15 verbose]      report            = true
[ INFO 2016-08-29 10:01:15 verbose]      pluginsync        = true
[ INFO 2016-08-29 10:01:15 verbose]      masterport        = 8140
[ INFO 2016-08-29 10:01:15 verbose] -    environment       = KT_Hilti_Library_hg_crash__Infra__Sat6Sandbox_Capsule_58
[ INFO 2016-08-29 10:01:15 verbose] +    environment       = production
[ INFO 2016-08-29 10:01:15 verbose]      certname          = li-lc-1589.hag.hilti.com
[ INFO 2016-08-29 10:01:15 verbose]      server            = li-lc-1589.hag.hilti.com
[ INFO 2016-08-29 10:01:15 verbose]      listen            = false
[ INFO 2016-08-29 10:01:15 verbose]  Computing checksum on file /etc/puppet/puppet.conf

Proposal for a fix is to create a fact with the current puppet environment and then use that fact in the puppet.conf.erb file.


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


How reproducible:


Steps to Reproduce:
1. Create server attach to Sat6 managed with puppet
2. Have a puppet module to also manage the puppet.conf to set the environment to the expected KT_ environment.
3. Run "satellite-installer --scenario=capsule" o the capsule

Actual results:
puppet.conf environment setting is reverted back to "production"

Expected results:
the existing puppet.conf environment setting is untouched


Additional info:

Comment 2 Stephen Benjamin 2016-10-13 16:16:54 UTC
If we exposed the "puppet" puppet module at the top level of the installer, it would solve it, as this is configurable:

https://github.com/theforeman/puppet-puppet/blob/master/manifests/init.pp#L224

Comment 3 Stephen Benjamin 2016-10-13 16:17:26 UTC
Created redmine issue http://projects.theforeman.org/issues/16919 from this bug

Comment 4 Peter Vreman 2016-10-14 08:05:00 UTC
Having a puppet environment specifiable on the satellite-installer level does not help, because the KT_ environment name generated by the Katello content views is unpredictable for the end user.

At least if an environment is set it shall not change it or the default at the satellie-installer shall be the existing environment. In my custom puppet modules i use a fact to expose the current puppet enviornment. And then write this one back in the puppet.conf when it is not overriden with an other parameter.

Comment 5 Bryan Kearney 2018-09-04 17:44:40 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.