Re: mulitlog not getting terminated when Red Hat reboots?

Charles Cazabon <[email protected]> Mon, 22 Jan 2007 20:49:03 -0600
Newsgroups gmane.comp.djb.syslog
Message-ID <[email protected]>
Brian Reichert <[email protected]> wrote:
> 
> The symptom is that upon a reboot, the multilog-managed logs end
> up with a '.u' suffix.

Yup.

> According to halt(8), when we issue the 'reboot' command in run
> level 3, this gets translated to the 'shutdown -r' command.  That
> manpage claims:
> 
>   All processes are first notified that the system is going down
>   by the signal SIGTERM.
> 
> The manpage for multilog(8) says:
> 
>   If multilog receives a TERM signal, it will read and process
>   data until the next newline, and then exit, leaving stdin at the
>   first byte of data it has not processed.

Yes.  What you haven't gleaned from that is that it will be immediately
restarted by supervise->svscan->init, because <servicedir>/log/down doesn't
exist.

This is pretty clear in the daemontools documentation.

> - How can I arrange for mulitlog to think there _isn't_ an outage
>   when we reboot?

Arrange for your systems scripts to touch /service/*/down and
/service/*/log/down just before sending the TERM signals at shutdown, and then
remove those `down` files after reboot when you want the services to come back
up.

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                              <[email protected]>
GPL'ed software available at:               http://pyropus.ca/software/
-----------------------------------------------------------------------