double 'ctlinnd flushlogs' deletes news, errlog

John F. Morse inn at xanadu-bbs.net
Wed Apr 10 15:35:06 UTC 2013


Hi Florian,

On 04/10/2013 05:14 AM, Florian Schlichting wrote:
> Hi Julien,
> 
> I just noticed a critical flaw in your recent commit to flush process /
> exploder channels. You introduced a second call to 'ctlinnd flushlogs'
> in scanlogs. Unfortunately, when 'ctlinnd flushlogs' is called, innd
> doesn't just flush its logs, it also rotates (moves) its log and errlog
> to news.old and errlog.old, overwriting what's already there. So the
> second call effectively destroys both logs. This happens in
> innd/innd.c:ReopenLog().
> 
> From ctlinnd(8):
> 
>    flushlogs
>        Close the news and error log files and rename them to add ".old" to
>        the file name, then open fresh news and error logs.  
> 
> Perhaps innd should stop do the .old rotation and restrict itself to
> flushing, and scanlogs should mv to .old rather than cp, and not just
> "in case innd is down", and the then the first invocation of 'ctlinnd
> flushlogs' can be deleted?
> 
> Florian


I would prefer the addition to the filename be the ISO 8601 date and time.

This certainly provides more information than ".old" plus making sorts easy,
and would eliminate overwrites.


-- 
John


More information about the inn-workers mailing list