[OpenAFS] Proposed changes for server log rotation
David R Boldt
dboldt@usgs.gov
Thu, 2 Dec 2010 15:28:48 -0500
This is a multipart message in MIME format.
--=_alternative 0070817F852577ED_=
Content-Type: text/plain; charset="US-ASCII"
> I've been been recently working on changes to improve how the server
> logs are handled to make it more straightforward to use commonly
> used tools for log rotation (like logrotate) out of the box. I'd
> like to solicit some comments on the subject.
>
> Currently, the when doing file-based logging, the servers create a
> new log file on each restart. The current log is renamed to a file
> with a extension of .old. The existing .old file is overwritten. In
> older versions, by default, the server processes were restarted
> weekly, so this made for a rudimentary log rotation. (There is no
> check on size or time on the .old file when the server restarts, so
> one annoying outcome is you can lose log information in the case a
> server process is restarted or crashes back to back.)
>
> 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. A .pid file for each server
> process would be created to allow the log rotate tool to signal the
> server processes to reopen log files after rotating the log files.
>
> The old behavior of renaming the logs at startup, deleting the
> existing .old file, would be available as a run-time option. Sites
> would be able to set this option as a command line switch for the
> server programs, and set bosserver to do weekly restarts (which, by
> the way, is no longer the default in the upcoming 1.6.x series).
If the wish list is open, the ability to log to a pipe so that one could
use
a tool such a cronolog would be convenient for us.
-- David Boldt
<dboldt@usgs.gov>
--=_alternative 0070817F852577ED_=
Content-Type: text/html; charset="US-ASCII"
<br><font size=2 face="sans-serif">> I've been been recently working
on changes to improve how the server<br>
> logs are handled to make it more straightforward to use commonly<br>
> used tools for log rotation (like logrotate) out of the box. I'd<br>
> like to solicit some comments on the subject.<br>
> <br>
> Currently, the when doing file-based logging, the servers create a<br>
> new log file on each restart. The current log is renamed to a file<br>
> with a extension of .old. The existing .old file is overwritten. In<br>
> older versions, by default, the server processes were restarted<br>
> weekly, so this made for a rudimentary log rotation. (There is no<br>
> check on size or time on the .old file when the server restarts, so<br>
> one annoying outcome is you can lose log information in the case a<br>
> server process is restarted or crashes back to back.)<br>
> <br>
> I propose in some future release of openafs this behavior be<br>
> deprecated and, by default, the server would simply append to the<br>
> already existing log file on startup. Also, each server would handle<br>
> the HUP signal to (at least) reopen the log file when it is rotated<br>
> by an external tool such as logrotate. A .pid file for each server<br>
> process would be created to allow the log rotate tool to signal the<br>
> server processes to reopen log files after rotating the log files.<br>
> <br>
> The old behavior of renaming the logs at startup, deleting the<br>
> existing .old file, would be available as a run-time option. Sites<br>
> would be able to set this option as a command line switch for the<br>
> server programs, and set bosserver to do weekly restarts (which, by<br>
> the way, is no longer the default in the upcoming 1.6.x series).<br>
</font>
<br><font size=2 face="sans-serif">If the wish list is open, the ability
to log to a pipe so that one could use </font>
<br><font size=2 face="sans-serif">a tool such a cronolog would be convenient
for us.</font>
<br>
<br><font size=2 face="sans-serif"><br>
--
David Boldt<br>
<dboldt@usgs.gov><br>
</font>
--=_alternative 0070817F852577ED_=--