supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* svlogd research
@ 2007-11-16 19:57 Larry Doolittle
  2007-11-16 20:10 ` Charlie Brady
  0 siblings, 1 reply; 4+ messages in thread
From: Larry Doolittle @ 2007-11-16 19:57 UTC (permalink / raw)
  To: supervision

Gerrit and friends -

I'm trying to create a tricky (for me) setup for svlogd, and have
some questions.  I want both a reliable local log, and an encrypted
(via stunnel) remote log, where I can't control the reliability
of the remote logging machine (or the network path to it).  My
environment is Debian sid amd64, currently runit 1.8.0-1.

So my /etc/runit/proggie/log/run file must look something like

#!/bin/sh
exec svlogd -t /var/log/proggie_local /var/log/proggie_remote

where /var/log/proggie_local is familiar territory.
/var/log/proggie_remote doesn't look too bad.  Every couple of
minutes I want to dump the accumulated logs (if any) to the remote
server, so I have lines in that directory's config file like

t120
! /usr/sbin/stunnel blah blah blah -r syslog.example.org:5140

My core question is what happens when stunnel fails or stalls.
The svlogd man page says

  A  processor  is  run  in  the background.  If svlogd sees a previously
  started processor still running when trying to start a new one for  the
  same  log, it blocks until the currently running processor has finished
  successfully.  Only the HUP signal works in that situation.  Note that
  this may block any program feeding its log data to svlogd.

That would be bad, since the same svlogd process is also responsible for
the local log.  Network stalls shouldn't affect proggie or its local logging.
When I look in the code for how this is supposed to work, I see the check
for a still-running processor for the previous data set

  if (ld->ppid) {
    warnx("processor already running", ld->name);
    return(0);
  }

but no caller to this routine checks for an exit code, and nothing
retries the call to processorstart().  So it looks like if one processor
run stalls indefinitely, no additional data will ever get sent to the
processor, and the svlogd process never stalls.  This doesn't sound like
what the documentation says.  Is my analysis correct?  Am I on the right
track in general?

  - Larry


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-11-16 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-16 19:57 svlogd research Larry Doolittle
2007-11-16 20:10 ` Charlie Brady
2007-11-16 20:23   ` Larry Doolittle
2007-11-16 22:08     ` George Georgalis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).