[OpenAFS] Re: Proposed changes for server log rotation

Michael Meffie mmeffie@sinenomine.net
Thu, 02 Dec 2010 15:12:38 -0500

Andrew Deason wrote:
> On Thu, 02 Dec 2010 13:50:36 -0500
> Michael Meffie <mmeffie@sinenomine.net> wrote:
>> I propose in some future release of openafs this behavior be
>> deprecated and, by default, the server would simply append to the
>> already existing log file on startup. Also, each server would handle
>> the HUP signal to (at least) reopen the log file when it is rotated
>> by an external tool such as logrotate.
> We already use HUP to reset the logging debug level, though.

Yes. I think ideally, HUP should be used to set the log level to
what every is the configured level in the yet to be implemented
config file.

> The fileserver already automatically checks every five minutes (I think)
> if it needs to reopen the log, and does so if the log file was moved. If
> people would find that acceptable, I'd rather just do something similar
> for all daemons. Unless we want to try to have the process guess whether
> you wanted to rotate the log or reset the log level, but that seems like
> it might be error prone even if we can guess that pretty well.

I think the check is ok, but a more common way to deal with this in my
opinion to have a postrotate script reopen the log, otherwise it looks
odd to be missing the log file for a five minute window. What do others