Try to avoid the trouble of talking to a filesystem for debug logs. Probably either just syslog, or feed a log through a client socket in a separate thread (to avoid stalls due to buffers filling up). Use fixed buffer(s), discard messages on overflow. Can be mostly part of libdaemon.
This is indeed rather problematic, requirement-wise. The only well specified part of this is "-d wire" (and the fact that "-d wire" "-d debug" and "-d wire,debug" all give different log results). The expectation is that "-d wire" will log all the traffic to/from the daemon. For -d debug, this cannot be reasonably verified, and is mostly a developer-oriented feature anyway, so I'd say it doesn't need to be tested by QA (other than that the feature did not break other features, i.e. sanity only as I understand it).
I am moving this to POST based on the current state of logging in lvmetad. While not perfect, it is a definitive improvement over 6.3 and should be useful enough for troubleshooting. Further improvements in logging should be tracked in new bugs, with specific requirements.
FWIW, comment #6 describes the different log options using the "-d" flag, but in reality the lvmetad command takes the "-l" flag for logging options.
I've run regression tests with lvmetad and the different logging flags and saw no regressions caused by this feature. That said, I also didn't see any logging to the /var/log/messages, Marking this verified (SanityOnly).
lvm2-2.02.98-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
lvm2-libs-2.02.98-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
lvm2-cluster-2.02.98-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
udev-147-2.43.el6 BUILT: Thu Oct 11 05:59:38 CDT 2012
device-mapper-1.02.77-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
device-mapper-libs-1.02.77-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
device-mapper-event-1.02.77-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
device-mapper-event-libs-1.02.77-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
cmirror-2.02.98-8.el6 BUILT: Wed Jan 16 07:57:25 CST 2013
The extra logging goes to stderr only at the moment. The code allows logging to syslog as well, but it's not user-exposed right now. Would it be more useful for you to be able to direct the debug logs to syslog? If that's the case, we can do that for the next cycle.
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.