[OpenAFS-devel] rethinking log rotation

Benjamin Kaduk kaduk@MIT.EDU
Mon, 26 Jan 2015 14:02:27 -0500 (EST)


On Mon, 26 Jan 2015, Benjamin Kaduk wrote:

> and summarize some of the recent topics of discussion in separate
> messages, to make the threading easier if discussion crops up on -devel.

We have a few changes in gerrit that modify how logs are handled in order
to make it less likely that valuable log information is lost during the
process of debugging an issue with a server.

Change 3347 makes bosserver default to just appending to BosLog and doing
no BosLog.old handling, such that external log rotation tools can be used.
This is potentially a disruptive change which could only be made on a
major release boundary (which is a lot of why we're talking about it now).

Change 11600 applies to the util/ logging routines, letting log rotation
be affected by log size instead of just always rolling the log at server
startup.  The log would only be rolled at startup if it is over 100k
(arbitrarily chosen), so that back-to-back restarts will keep the new log
and preserve the older log.

Taking both changes would of course lead to inconsistent behavior between
bosserver and everything else -- jhutz had suggested that 11600 could be
modified to behave similarly to 3347 (i.e., never rotate the log unless a
command-line switch is given to retain the old behavior).  Then an
external log rotation tool could be used everywhere.

Personally, I think we should take advantage of the major release boundary
to revamp how we handle our logfiles, but I am not sure which approach is
better.  What do other people think?

-Ben