Bug 1511158 - puppet4 host is setup to use default puppet3 puppetdirs
Summary: puppet4 host is setup to use default puppet3 puppetdirs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 19:12 UTC by Lukas Pramuk
Modified: 2019-09-26 14:49 UTC (History)
4 users (show)

Fixed In Version: foreman-1.15.6.8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:29:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1514902 0 high CLOSED host provisioning failed due to an error rendering satellite kickstart default template 2021-02-22 00:41:40 UTC

Internal Links: 1514902

Description Lukas Pramuk 2017-11-08 19:12:16 UTC
Description of problem:
puppet4 host is setup for non-default p4 puppetdirs. nothing is broken but we diverted from p4 default dirs and I guess that's not what we want...

@p4 provisioned host:

[main]
vardir = /var/lib/puppet  < p3 default
logdir = /var/log/puppet  < p3 default
rundir = /var/run/puppet  < p3 default
ssldir = $vardir/ssl

It can be fixed by changes in "puppet.conf" provisioning template to extend first condition to include also enable-puppet4 param:

  if (@host.param_true?('enable-puppetlabs-pc1-repo') || @host.param_true?('enable-puppet4')) && (os_family == 'Debian' || os_family == 'Redhat' || os_name == 'SLES')

Version-Release number of selected component (if applicable):
Satellite 6.3.0 Beta Snap23 

How reproducible:
deterministic

Steps to Reproduce:
1. Provision p4 host (with AK bound to p4 repo and by "enable-puppet4" param set to true

2. Check puppetdirs in the puppet conf
# grep dir /etc/puppetlabs/puppet/puppet.conf 

Actual results:
vardir = /var/lib/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = $vardir/ssl

Expected results:
vardir = /opt/puppetlabs/puppet/cache
logdir = /var/log/puppetlabs/puppet
rundir = /var/run/puppetlabs
ssldir = /etc/puppetlabs/puppet/ssl

Comment 2 Daniel Lobato Garcia 2017-11-14 09:59:30 UTC
https://github.com/theforeman/community-templates/commit/1207a19b55051ed0687a33d7a8de1834dc2d46fb already fixes this upstream, and 1.16 Foreman includes it, so it shouldn't be hard to fix. 

I think I will just submit a Merge Request for this in Satellite, will update as soon as I know how to proceed.

Comment 4 Lukas Pramuk 2017-11-21 13:19:50 UTC
Verification is blocked by #1514902 (extra line break causing template to fail to render)

Comment 5 Marek Hulan 2017-11-21 16:44:14 UTC
If this is a manual verification, feel free to unlock the template, delete the \n and continue testing this BZ.

Comment 6 Lukas Pramuk 2017-11-22 10:24:30 UTC
I did and things are just fine - p3 works p4 works too. 
Once the fix lands I 'll verify this bz

Comment 7 Lukas Pramuk 2017-11-30 10:14:13 UTC
VERIFIED.

@satellite-6.3.0-21.0.beta.el7sat.noarch
foreman-1.15.6.12-1.el7sat.noarch

by manual reproducer described in comment#0:

@p4 host:

# grep dir /etc/puppetlabs/puppet/puppet.conf 
vardir = /opt/puppetlabs/puppet/cache
logdir = /var/log/puppetlabs/puppet
rundir = /var/run/puppetlabs
ssldir = /etc/puppetlabs/puppet/ssl

>>> puppet4 host is correctly setup for the default p4 puppetdirs while puppet3 host is still using its puppet3 defaults

Comment 8 Bryan Kearney 2018-02-21 17:29:59 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/RHSA-2018:0336


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