Bug #4139
'autoflush' ... doesn't
| Status: | Closed | Start date: | 07/05/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | logging | |||
| Target version: | 2.6.5 | |||
| Affected Puppet version: | 0.25.5 | Branch: | ||
| Keywords: | logging | |||
| Votes: | 2 |
Description
Running puppetd with a file logdest writes buffered output with a rather large buffer, causing many of the admins who work with puppet at my site to become confused as to whether it’s actually doing anything. I tried adding the ‘autoflush’ parameter in puppet.conf but it doesn’t seem to affect the behaviour.
Incidentally I see the same issue (autoflush is either ignored or does not function as advertised) running puppetmasterd.
Related issues
History
Updated by eric sorenson over 1 year ago
Forgot to mention – Seeing this on both Solaris and Mac OS X.
Updated by James Turnbull over 1 year ago
- Status changed from Unreviewed to Accepted
- Assignee set to Nick Lewis
Nick – Is this related to #4114?
Updated by Marcin Deranek over 1 year ago
I see similar behavior on CentOS5 x86_64 / puppet 0.25.5 / passenger 2.2.15 / REE 1.8.7 2010.02 although not exactly the same.. My clients do not have problems with logging when using —logdest parameter (autoflush=true), although puppetmaster has (running under passenger). I tested the following scenarios:
Added ‘ARGV << “—logdest=/var/log/puppet/puppetmaster.log”’ to config.ru No output in log file at reasonable time (could be buffered somewhere as file is opened and logs do not end up in syslog)
Added ‘ARGV << “—logdest=/var/log/puppet/puppetmaster.log”\nARGV << “—verbose”’ to config.ru Although I get an output in the file it’s written in 4kB blocks.
Modified puppetmasterd.rb file to use /var/log/puppet/puppetmaster.log as default log destination. Logs are written correctly without any problem.
In all cases I had autoflush=true. The bad thing about 1 & 2 is that during restart logs are gone (never written to disk).
Updated by Nick Lewis over 1 year ago
- Assignee deleted (
Nick Lewis)
Updated by John Warburton about 1 year ago
Confirming this for puppet 2.6.4 on passenger 2.2.14 on Solaris
Especially annoying is restarting & you lose part of the logs :–(
Updated by James Turnbull about 1 year ago
- Category set to logging
- Assignee set to James Turnbull
- Target version set to 2.6.5
Updated by James Turnbull about 1 year ago
- Status changed from Accepted to Duplicate
Fixed in #5952.
Updated by Daniel Pittman about 1 year ago
- Status changed from Duplicate to Re-opened
- Assignee changed from James Turnbull to Daniel Pittman
Further investigation shows that this is a genuine issue: we have an ordering dependency in the processing of command line arguments; autoflush works if, and only if, it was set prior to setting up the file log destination.
This would work as desired:
puppet agent --autoflush --logdest=file
This would not work, as autoflush would be false:
puppet agent --logdest=file --autoflush
Updated by Daniel Pittman about 1 year ago
- Status changed from Re-opened to Merged - Pending Release
Available in 2.6.next as commit:0502c55
This fixes the order dependency of autoflush vs file log destination configuration.
Updated by Nick Lewis about 1 year ago
- Status changed from Merged - Pending Release to Closed