On Fri, Nov 26, 2010 at 10:46:54PM +0100, Alan DeKok wrote:
> Alan Buxey wrote:
> > one eagle-eyed member spotted a small issue with our systems after the 
> > upgrade to 2.1.10
> 
>   It's actually in 2.1.9.
> 
> > the sudden obvious fix is to add the HUP/restart part to the logrotate 
> > script but
> > we've never ever had to do this in the past...and I'm loathe to do such a 
> > thing...i wonder
> > what has changed regarding file handling ?
> 
>   You now have to HUP after logrotate.
> 
>   Before, it wouldn't re-open the file, even if you did HUP it.  I'm not
> sure why you thought it was rotating the log files before... that just
> didn't work.  It opened the log file when the server started, and never
> touched it again after that.

You keep repeating this, yet a trivial git log search for the HUP change
finds cf43a8261cd89829f12e69fdb066fdec8b18579c where the removed code
included:

                [...] if (log_fp) {
                        struct stat buf;

                        if (stat(myconfig->log_file, &buf) < 0) {
                                fclose(log_fp);
                                log_fp = fr_log_fp = NULL;
                        }
                }

                if (!log_fp && myconfig->log_file) {
                        fp = fopen(myconfig->log_file, "a");
                [...]
                log_fp = fp;

So logrotate would move the log file away, and the next log message from FR
would run this code, which would stat the existing log_fp pointing to a
missing file, and proceed to close the fp and then reopen it.

Please don't add insult to injury...

-- 
     2. That which causes joy or happiness.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to