Bug 202704 - [PATCH] sysutils/puppet update puppetmaster rc.d script to use `manifest` instead of `manifestdir`/site.pp
Summary: [PATCH] sysutils/puppet update puppetmaster rc.d script to use `manifest` ins...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Steve Wills
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-08-28 04:15 UTC by lemon
Modified: 2015-11-03 19:05 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments
patch for puppetmaster rc.d script (823 bytes, text/plain)
2015-08-28 04:15 UTC, lemon
no flags Details
Package info and config (1.80 KB, text/plain)
2015-08-28 04:16 UTC, lemon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description lemon 2015-08-28 04:15:42 UTC
Created attachment 160431 [details]
patch for puppetmaster rc.d script

The `rc.d/puppetmaster` script sanity checks Puppet configuration before starting using `puppet validate `${puppetmaster_manifestdir}/site.pp`

Directory-based environments [1] provide a level of indirection for the location of the default site manifest through `environment.conf`. This allows the administrator to set a new location for `site.pp` with the `manifest` directive, but it does not allow for a new `manifestdir` [2][3].

This means it's possible to have `puppet config` report a bogus answer to `print manifestdir` whilst reporting the correct answer to `print manifest`. This prevents the Puppetmaster from starting because it can not validate an absent `/usr/local/etc/puppet/manifests/site.pp`.

This small patch makes the script discover and validate the site manifest wherever it has been configured to be.

[1] https://docs.puppetlabs.com/puppet/3.8/reference/environments_creating.html
[2] https://docs.puppetlabs.com/puppet/3.8/reference/config_file_environment.html#allowed-settings
[3] My own motivation is to point Puppet to a Git repository elsewhere and leave /usr/local/etc/puppet (almost) alone
Comment 1 lemon 2015-08-28 04:16:52 UTC
Created attachment 160432 [details]
Package info and config
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-11-03 19:02:19 UTC
A commit references this bug:

Author: mmoll
Date: Tue Nov  3 19:02:09 UTC 2015
New revision: 400710
URL: https://svnweb.freebsd.org/changeset/ports/400710

Log:
  sysutils/puppet: update to 3.8.3

  - update to 3.8.3 [1]
  - refactor manifest check in puppetmaster rc.d script [2]
  - bring in the pkgng package provider also used in Puppet 4 [3]
  - take maintainership

  PR:		203683 [1]
  PR:		202704 [2]
  Submitted by:	tdb [1]
  Submitted by:	lemon <yesthanks@lemonia.org> [2]
  Approved by:	swills (maintainer)
  Obtained from:	https://github.com/xaque208/puppet-pkgng [3]
  Differential Revision:	https://reviews.freebsd.org/D4050

Changes:
  head/sysutils/puppet/Makefile
  head/sysutils/puppet/distinfo
  head/sysutils/puppet/files/patch-lib_puppet_provider_package_pkgng.rb
  head/sysutils/puppet/files/puppetmaster.in
Comment 3 Michael Moll freebsd_committer freebsd_triage 2015-11-03 19:05:05 UTC
commited, thanks!

As a side note, sysutils/puppet4 also is using this version since it got added to the ports collection.