Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. Re: double 'ctlinnd flushlogs' deletes news, errlog (Julien ?LIE)
2. Re: double 'ctlinnd flushlogs' deletes news, errlog (Julien ?LIE)
----------------------------------------------------------------------
Message: 1
Date: Sat, 13 Apr 2013 18:57:55 +0200
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: double 'ctlinnd flushlogs' deletes news, errlog
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi Florian,
> 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.
Oooops! You're totally right. Thanks for having caught the issue in
log archives.
> 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 then the first invocation of 'ctlinnd
> flushlogs' can be deleted?
That's a possibility. But shouldn't "news" and "errlog" then treated
like what is done for live files just below? (using a symbolic link
rather than a copy)
A point to take into account: changing the "flushlogs" behaviour would
not be possible in the STABLE 2.5 branch, but only in 2.6... so the bug
you report will still be present.
Another possibility, suggested by the TODO file:
* ctlinnd flushlogs currently renames all of the log files. It would be
nice to support the method of log rotation that most other daemons
support, namely to move the logs aside and then tell innd to reopen its
log files. Ideally, that behavior would be triggered with a SIGHUP.
scanlogs would have to be modified to handle this.
The best way to support this seems to be to leave scanlogs as is by
default, but also add two additional modes. One would flush all the
logs and prepare for the syslog logs to be rotated, and the other would
do all the work needed after the logs have been rotated. That way, if
someone wanted to plug in a separate log rotation handler, they could do
so and just call scanlogs on either side of it. The reporting portions
of scanlogs should be in a separate program.
The current "flushlogs" does:
- ICDwrite (flush history, articles in the storage manager, and active)
- rename the news file
- reopen the news file
- rename the errlog file
- reopen the errlog file
- flush exploder and process channels
We could add "prerotatelogs" and "postrotatelogs" modes (another
suggestion of naming?) which would do:
prerotatelogs
-------------
- ICDwrite (flush history, articles in the storage manager, and active)
postrotatelogs
--------------
- reopen the news file
- reopen the errlog file
- flush exploder and process channels
Then, scanlogs will call "prerotatelogs" instead of the first
"flushlogs", rename the news and errlog files like live files, and call
"postrotatelogs" instead of the second "flushlogs".
Would this suggestion suit you?
--
Julien ?LIE
? ? Gallo-pin !
? Il a toujours ?t? comme ?a? C'est une brute gallo-n?e ! ?
(Ast?rix)
------------------------------
Message: 2
Date: Sat, 13 Apr 2013 18:57:59 +0200
From: Julien ?LIE <[email protected]>
To: [email protected]
Subject: Re: double 'ctlinnd flushlogs' deletes news, errlog
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252; format=flowed
Hi John,
>> 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.
>
> 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.
The ".old" extension is used temporarily, between the moment the current
log is moved (to ".old") and the moment it is rotated (to for instance
".1.gz").
In your <pathlog> directory, you will only see a "news" log file; the
"news.old" file does not exist. And in <pathlog>/OLD, you will see
"news.1.gz", which allows to sort the log files.
--
Julien ?LIE
? ? Ensuite, il n'y a plus qu'? tirer, comme pour la p?che au
gros.
? Qui est gros ? ? (Ast?rix)
------------------------------
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
End of inn-workers Digest, Vol 50, Issue 3
******************************************