FreeRADIUS 2.1.10 regression in logging behaviour
Alan DeKok
aland at deployingradius.com
Sat Nov 27 04:53:40 CET 2010
Josip Rodin wrote:
> On Fri, Nov 26, 2010 at 10:46:54PM +0100, Alan DeKok wrote:
>> 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:
..
> 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.
IIRC, that had issues when I tested it, which is why the code was
changed. One obvious issue is that it's not thread-safe. The log file
is closed for a while, and messages can be lost.
> Please don't add insult to injury...
I'm not trying to.
Another issue with the previous code is that it would reopen the log
file only when it had a message to write. This is also arguably wrong.
See http://bugs.mysql.com/bug.php?id=55711 for a similar bug.
I understand that changing the behavior is unwanted, but is it really
that much of a burden to HUP the server?
Alan DeKok.
More information about the Freeradius-Users
mailing list