[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">&gt; I've been been recently working
on changes to improve how the server<br>
&gt; logs are handled to make it more straightforward to use commonly<br>
&gt; used tools for log rotation (like logrotate) out of the box. I'd<br>
&gt; like to solicit some comments on the subject.<br>
&gt; <br>
&gt; Currently, the when doing file-based logging, the servers create a<br>
&gt; new log file on each restart. The current log is renamed to a file<br>
&gt; with a extension of .old. The existing .old file is overwritten. In<br>
&gt; older versions, by default, the server processes were restarted<br>
&gt; weekly, so this made for a rudimentary log rotation. (There is no<br>
&gt; check on size or time on the .old file when the server restarts, so<br>
&gt; one annoying outcome is you can lose log information in the case a<br>
&gt; server process is restarted or crashes back to back.)<br>
&gt; <br>
&gt; I propose in some future release of openafs this behavior be<br>
&gt; deprecated and, by default, the server would simply append to the<br>
&gt; already existing log file on startup. Also, each server would handle<br>
&gt; the HUP signal to (at least) reopen the log file when it is rotated<br>
&gt; by an external tool such as logrotate. A .pid file for each server<br>
&gt; process would be created to allow the log rotate tool to signal the<br>
&gt; server processes to reopen log files after rotating the log files.<br>
&gt; <br>
&gt; The old behavior of renaming the logs at startup, deleting the<br>
&gt; existing .old file, would be available as a run-time option. Sites<br>
&gt; would be able to set this option as a command line switch for the<br>
&gt; server programs, and set bosserver to do weekly restarts (which, by<br>
&gt; 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>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; --
David Boldt<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &lt;dboldt@usgs.gov&gt;<br>
</font>
--=_alternative 0070817F852577ED_=--