[PATCHES] CTDB logging rework
martin at meltin.net
Thu Oct 23 04:09:19 MDT 2014
On Thu, 23 Oct 2014 19:54:01 +1100, Martin Schwenke <martin at meltin.net>
> On Fri, 17 Oct 2014 21:00:29 +1100, Martin Schwenke <martin at meltin.net>
> > On Fri, 17 Oct 2014 10:55:53 +0200, Volker Lendecke
> > <Volker.Lendecke at SerNet.DE> wrote:
> > > On Fri, Oct 17, 2014 at 02:53:01PM +1100, Martin Schwenke wrote:
> > > > This reworks much of the CTDB logging subsystem. Main points are:
> > > >
> > > > * Bug fix to put a newline back at the end of messages logged to file
> > > > (recent regression).
> > > >
> > > > * Remove the separate CTDB log daemon.
> > > >
> > > > * Add syslog via UDP logging, as per RFCs 5424 and RFC5426.
> > >
> > > As talked about via chat, it would be great to also do
> > > nonblocking sendmsg to /dev/log.
> > Yep. I've had more of a think. I'll simplify it to have just a "file"
> > and a "syslog" backend. Instead of specifying "syslog-udp", I'll make
> > it "syslog:udp", so the difference can be handled in the setup function.
> > Then I can trivially add "syslog:lossy" (or "syslog:nonblocking").
> > ... and then I'm getting out of the logging business... ;-)
> I'm calling this done. New patches attached. :-)
> Things I've learned:
> * RFC5424 is not supported on /dev/log.
> * RFC3164 is the alternative and, although specified for the UDP port,
> is not properly supported on UDP on FreeBSD... and nowhere
> on /dev/log (or /var/run/log on FreeBSD). The best compromise is to
> use a degenerate form of RFC3164, which drops the header (timestamp
> and hostname) completely. This allows rsyslogd to generate hi-res
> timestamps when configured, and allows reasonable logging on UDP,
> though with hostname "localhost".
> * rsyslogd supports different message formats on different sockets.
> Why would you do that?!?
> * I don't want to look at logging code for a while! :-)
> Please review and push if OK.
> These patches are in my ctdb-logging branch:
> When we sort out the debug_extra thing in CTDB, the RFC3164 logging
> to /dev/log and UDP can probably go into debug.[ch] pretty easily. The
> UDP RFC5424 logging could go there too if setup_logging() is extended to
> take a hostname... but later... much later... :-)
[I think the above message got moderated]
Please replace the last patch in the series attached to the previous
message with one attached to this message. This fixes a small typo in
ctdbd_wrapper that I had failed to commit, so that last patch was wrong.
My ctdb-logging branch is up-to-date... it includes this fix.
peace & happiness,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5839 bytes
Desc: not available
More information about the samba-technical