Re: Working on shell for perp/s6/etc., need advice re logging

From: Ido Perlmuter <ido_at_ido50.net>
Date: Thu, 30 Jul 2015 21:57:36 +0300

Just realised I've accidentally only sent this email to Colin instead of
the entire list...

Huh, I watched it through a few rotations and it never moved off of fd 4 (a
> host of mine has some brutal clock skew and has been slowly ntp-slewing
> it's way back into line). I didn't look at s6-log processes servicing
> multiple logdirs, those are definitely going to skew things. Which means
> I'm probably wrong vis-a-vis svlogd and fd 6 as well.
>

Funny, on my system (Arch Linux), s6-log seems to be on fd 3, at least so
long as I was checking it.


> > If you want to go the "map the current log file" route instead of
> > the "insert hooks somewhere in the log flow" one, grepping all the
> > links in /proc/$loggerpid/fd for /current$ sounds like a better
> > solution - and even then it's still hackish.
> It's hacky, but at least it's accurate and not as race-prone as reading
> data out of the log script itself. A heavy-weight solution like inserting a
> data-forking service in the logging chain is cleaner but another step in
> the logging chain than could fail and take out everything. One of the nice
> parts of the daemontools/s6 logging guarantee is that your logger is
> guaranteed to get it's messages. Adding a log fork-and-forward service is
> another point of failure.
>

Yesterday I've already implemented reading via the fd links, I'll add this
behaviour to make it a bit stronger.

Wayne, I'll take a look into your insights and suggestions. Funny I wasn't
aware of tinylog_run, it doesn't appear on the perp documentation.

Anyway, thanks for all the help guys, I really didn't expect that much of a
response. I think this shell could be nice (it already is), I've got some
cool
features there (for me at least) where I group together multi-process
services into one line, and I have support for wildcards when
stopping/starting/restarting services. I have plans to take it a bit
further and add support for grouping and tagging services, and then being
able to collectively send them commands as well.

I'll release the first version soon, with proper documentation, I'll be
happy to get your notes and impressions.

Thanks,
Ido.
Received on Thu Jul 30 2015 - 18:57:36 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC