Bug 227440 - sysutils/puppet5: puppetmaster shows warning even if puppetmaster_enable is NO
Summary: sysutils/puppet5: puppetmaster shows warning even if puppetmaster_enable is NO
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Puppet Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-11 07:29 UTC by Kan Sasaki
Modified: 2018-04-11 14:58 UTC (History)
1 user (show)

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


Attachments
patch for puppetmaster (713 bytes, patch)
2018-04-11 07:29 UTC, Kan Sasaki
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kan Sasaki 2018-04-11 07:29:06 UTC
Created attachment 192429 [details]
patch for puppetmaster

Even if puppetmaster_enable sets to NO, the following message show at startup.

Set the config section by using the `--section` flag.
For example, `puppet config --section user print foo`.
For more information, see https://puppet.com/docs/puppet/latest/configuration.html
Resolving settings from section 'main' in environment 'production'
Comment 1 Romain Tartière freebsd_committer freebsd_triage 2018-04-11 14:23:53 UTC
Hello!

Thanks for the report!

This seems to be due to the `puppet_manifest="$($command config print manifest)"` line in the rc script.

Adding --section=main still produce some colored output, but since $puppet_manifest is only used in the puppetmaster_checkconfig() function, I propose to move the assignation in the function itself.

I am testing this right now.
Comment 2 Romain Tartière freebsd_committer freebsd_triage 2018-04-11 14:43:13 UTC
So, the manifest setting cannot be set with Puppet 4 nor Puppet 5, but Puppet 5 insists on outputting the section and environment when using `puppet config print` (and add extra verbosity when the section is not explicit).

So, let's silent stderr for now…
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-04-11 14:55:33 UTC
A commit references this bug:

Author: romain
Date: Wed Apr 11 14:54:38 UTC 2018
New revision: 467077
URL: https://svnweb.freebsd.org/changeset/ports/467077

Log:
  Improve the puppetmaster rc-scripts

  - Only check manifests syntax if the puppetmaster service is enabled (which is
    not recommended);
  - Silent `puppet config print` on Puppet 5;
  - Bump PORTREVISION.

  With hat:	puppet
  PR:		227440
  Submitted by:	sasaki@fcc.ad.jp

Changes:
  head/sysutils/puppet4/Makefile
  head/sysutils/puppet4/files/puppetmaster.in
  head/sysutils/puppet5/Makefile
  head/sysutils/puppet5/files/puppetmaster.in
Comment 4 Romain Tartière freebsd_committer freebsd_triage 2018-04-11 14:57:48 UTC
if enabled

Reduce noise of the puppetmaster service.

If the service is not enabled, it should not output anything;
If enabled, 



Only check manifests syntax if the puppetmaster service is enabled.

Improve the puppetmaster rc-script

- Only check manifests syntax if the puppetmaster service is enabled (which is not recommended);
- Silent `puppet config print` with Puppet 5 that outputs a lot of diagnostic to stderr.
Comment 5 Romain Tartière freebsd_committer freebsd_triage 2018-04-11 14:58:48 UTC
D'oh, I should stop taking notes for commit messages in Bugzilla :-D  Sorry for the noise!