[PUP-2989] 3.x "profile = true" and "--profile" does nothing. Created: 2014/07/29  Updated: 2015/01/22  Resolved: 2014/08/27

Status: Closed
Project: Puppet
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Normal
Reporter: Celia Cottle Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relates to PUP-2997 Logdest cannot be set in the puppet.conf Closed
relates to PUP-2998 Allow log_level option to be specifie... Closed


Currently, adding "profile = true" or doing runs with --debug and --profile (since you need debug with it) returns none of the PROFILE lines mentioned in the documentation, or as far as I can tell, any extra output at all. I restarted services, tried it a few times, checked the logs repeatedly, nothing.

Comment by Charlie Sharpsteen [ 2014/07/30 ]

Unable to completely re-produce using PE 3.3.0.

Adding the following to the puppetmaster config.ru results in PROFILE output in /var/log/pe-puppet/master_debug.log:

ARGV << "--debug"
ARGV << "--logdest" << "/var/log/pe-puppet/master_debug.log"
ARGV << "--profile"

Adding just the following:

ARGV << "--debug"
ARGV << "--logdest" << "/var/log/pe-puppet/master_debug.log"

Allows profiling to be toggled by setting profile = true in the master's puppet.conf section or by passing --profile during an agent run.

I did note a couple weird things:

  • The master cannot be set to log debug output by setting log_level in puppet.conf. The --debug flag must be added to the puppet master ARGV in config.ru.
  • PROFILE info does not show up in syslog, even when debug output is enabled on the master and rsyslog throttling is disabled. Master logs have to be redirected to a new file in order to get profile. Additionally, setting logdest in puppet.conf has no effect, the --logdest flag also must be passed to the master using ARGV in config.ru.
Comment by Charlie Sharpsteen [ 2014/07/30 ]

Celia Cottle: Two questions:

  • Which version(s) of PE/Puppet are you seeing this occur with?
  • Does editing config.ru result in profiling output?
Comment by Celia Cottle [ 2014/07/30 ]

3.2.1 and 3.3.0 both showed it. Editing config.ru does indeed produce output. Is the documentation just missing those steps?

Comment by Charlie Sharpsteen [ 2014/07/31 ]

There are definitely some genuine bugs here, notably:

  • log_level and logdest don't do anything when put into puppet.conf.
  • Passing --debug to the master in config.ru does raise the log level and some debugging messages do show up in syslog. However, profiling messages are missing for some strange reason.

In the short term, a documentation patch will probably be the quickest way to make things better.

Comment by Charlie Sharpsteen [ 2014/08/27 ]

So, rsyslog configuration turned out to be the reason I wasn't seeing profiling information without changing logdest to point at a file. By default, rsyslog on CentOS filters out any messages that are not INFO level or higher.

So, in order to see PROFILE info from a master, you will have to either set logdest to a file or adjust the syslog settings.

PUP-2997 and PUP-2998 have been opened to get logdest and log_level settable in puppet.conf.

Generated at Sat Aug 08 17:37:01 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.