Send inn-committers mailing list submissions to inn-committers@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/inn-committers or, via email, send a message with subject or body 'help' to inn-committers-requ...@lists.isc.org You can reach the person managing the list at inn-committers-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of inn-committers digest..." Today's Topics: 1. INN commit: trunk/innfeed (article.c) (INN Commit) 2. INN commit: branches/2.5/innfeed (article.c) (INN Commit) 3. INN commit: trunk (doc/pod/news.pod innd/cc.c scripts/scanlogs.in) (INN Commit) 4. INN commit: branches/2.5 (3 files) (INN Commit) ---------------------------------------------------------------------- Message: 1 Date: Mon, 18 Mar 2013 11:37:56 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: trunk/innfeed (article.c) Message-ID: <20130318183756.8bb0367...@hope.eyrie.org> Date: Monday, March 18, 2013 @ 11:37:56 Author: iulius Revision: 9461 Superfluous character in innfeed.log output Modified: trunk/innfeed/article.c -----------+ article.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: article.c =================================================================== --- article.c 2013-02-23 22:52:33 UTC (rev 9460) +++ article.c 2013-03-18 18:37:56 UTC (rev 9461) @@ -238,7 +238,7 @@ newArt->fname) ; newArt->refCount++ ; - d_printf (2,"Reusing existing article for %s\nx",msgid) ; + d_printf (2,"Reusing existing article for %s\n",msgid) ; } TMRstop(TMR_NEWARTICLE); return newArt ; ------------------------------ Message: 2 Date: Mon, 18 Mar 2013 11:38:34 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: branches/2.5/innfeed (article.c) Message-ID: <20130318183834.2b2fd67...@hope.eyrie.org> Date: Monday, March 18, 2013 @ 11:38:34 Author: iulius Revision: 9462 Superfluous character in innfeed.log output Modified: branches/2.5/innfeed/article.c -----------+ article.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Modified: article.c =================================================================== --- article.c 2013-03-18 18:37:56 UTC (rev 9461) +++ article.c 2013-03-18 18:38:34 UTC (rev 9462) @@ -238,7 +238,7 @@ newArt->fname) ; newArt->refCount++ ; - d_printf (2,"Reusing existing article for %s\nx",msgid) ; + d_printf (2,"Reusing existing article for %s\n",msgid) ; } TMRstop(TMR_NEWARTICLE); return newArt ; ------------------------------ Message: 3 Date: Mon, 18 Mar 2013 11:47:27 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: trunk (doc/pod/news.pod innd/cc.c scripts/scanlogs.in) Message-ID: <20130318184727.65e0a67...@hope.eyrie.org> Date: Monday, March 18, 2013 @ 11:47:27 Author: iulius Revision: 9463 Rotate innfeed logs Exploder and process channels are now properly reopened when "ctlinnd flushlogs" is used, which is in particular the command invoked by scanlogs to rotate log files. It solves the issue that caused the patch to be reverted by commit [9449]. Modified: trunk/doc/pod/news.pod trunk/innd/cc.c trunk/scripts/scanlogs.in ---------------------+ doc/pod/news.pod | 12 ++++++++++++ innd/cc.c | 14 +++++++++++++- scripts/scanlogs.in | 24 +++++++++++++++++++++++- 3 files changed, 48 insertions(+), 2 deletions(-) Modified: doc/pod/news.pod =================================================================== --- doc/pod/news.pod 2013-03-18 18:38:34 UTC (rev 9462) +++ doc/pod/news.pod 2013-03-18 18:47:27 UTC (rev 9463) @@ -117,6 +117,18 @@ =back +=head1 Changes in 2.5.4 + +=item * + +When using funnel feeds, B<innfeed> log files were open forever, which +resulted in empty log files, once rotated by B<scanlogs>. Exploder and +process channels are now reopened when C<ctlinnd flushlogs> is used, +which is in particular the command invoked by B<scanlogs> to rotate +log files. + +=back + =head1 Changes in 2.5.3 Please note that the HTML_STATUS compile-time option has been replaced Modified: innd/cc.c =================================================================== --- innd/cc.c 2013-03-18 18:38:34 UTC (rev 9462) +++ innd/cc.c 2013-03-18 18:47:27 UTC (rev 9463) @@ -629,11 +629,14 @@ /* -** Flush the log files. +** Flush the log files as well as exploder and process channels. */ static const char * CCflushlogs(char *unused[]) { + SITE *sp; + CHANNEL *cp; + int i; unused = unused; /* ARGSUSED */ if (Debug) @@ -643,6 +646,15 @@ syslog(L_NOTICE, "%s flushlogs %s", LogName, CCcurrmode()); ReopenLog(Log); ReopenLog(Errlog); + /* Flush exploder and process channels so that they take into account + * the new log files (for instance during log rotation). */ + for (sp = Sites, i = nSites; --i >= 0; sp++) { + if (((cp = sp->Channel) != NULL) + && ((cp->Type == CTexploder) || (cp->Type == CTprocess))) { + SITEflush(sp, true); + syslog(L_NOTICE, "%s flush", sp->Name); + } + } return NULL; } Modified: scripts/scanlogs.in =================================================================== --- scripts/scanlogs.in 2013-03-18 18:38:34 UTC (rev 9462) +++ scripts/scanlogs.in 2013-03-18 18:47:27 UTC (rev 9463) @@ -22,12 +22,21 @@ ## Where these programs, if used, write their logs. ## We also have to find innfeed's log file. CONTROLBATCH=${MOST_LOGS}/controlbatch.log +INNFEEDCONF=${PATHETC}/innfeed.conf +if [ -f "${INNFEEDCONF}" ]; then + INNFEEDLOG=`${AWK} '{gsub(/:|#/, " & ")} {if ($1 == "log-file" && $2 == ":") print $3}' ${INNFEEDCONF}` +fi +INNFEED= +for F in "${INNFEEDLOG}" ; do + test -f "${MOST_LOGS}/${F}" && INNFEED="${INNFEED} ${MOST_LOGS}/${F}" +done +test -z "${INNFEED}" && test -f "${MOST_LOGS}/innfeed.log" && INNFEED="${MOST_LOGS}/innfeed.log" NNTPSEND=${MOST_LOGS}/nntpsend.log PERLNOCEM=${MOST_LOGS}/perl-nocem.log SENDIHAVE=${MOST_LOGS}/send-ihave.log SENDNNTP=${MOST_LOGS}/send-nntp.log SENDUUCP=${MOST_LOGS}/send-uucp.log -LIVEFILES="${CONTROLBATCH} ${NNTPSEND} ${PERLNOCEM} ${SENDIHAVE} ${SENDNNTP} ${SENDUUCP}" +LIVEFILES="${CONTROLBATCH} ${INNFEED} ${NNTPSEND} ${PERLNOCEM} ${SENDIHAVE} ${SENDNNTP} ${SENDUUCP}" ## Where news.daily places expire output, unless noexplog was used. EXPLOG=${MOST_LOGS}/expire.log @@ -102,6 +111,9 @@ ctlinnd -s logmode PAUSED=false ctlinnd -s pause "Flushing log and syslog files" 2>&1 && PAUSED=true + + # First, flush log files to be sure everything has been recorded + # before rotating them. OUTPUT=`ctlinnd flushlogs 2>&1` if [ "$OUTPUT" != "Ok" -a "$OUTPUT" != "In debug mode" ]; then echo "$OUTPUT" @@ -148,6 +160,16 @@ ## Tally control messages if we logged them. test -n "${CONTROL_DATA}" && cat ${CONTROL_DATA} | ${TALLY_CONTROL} + # Flush again log files so that freshly rotated new log files + # are properly taken into account. + OUTPUT=`ctlinnd flushlogs 2>&1` + if [ "$OUTPUT" != "Ok" -a "$OUTPUT" != "In debug mode" ]; then + echo "$OUTPUT" + echo 'Cannot flush logs.' + rm -f ${LOCK} + exit 1 + fi + ${PAUSED} && ctlinnd -s go "Flushing log and syslog files" 2>&1 cd ${OLD} ------------------------------ Message: 4 Date: Mon, 18 Mar 2013 11:48:18 -0700 (PDT) From: INN Commit <r...@isc.org> To: inn-committ...@isc.org Subject: INN commit: branches/2.5 (3 files) Message-ID: <20130318184818.6249567...@hope.eyrie.org> Date: Monday, March 18, 2013 @ 11:48:18 Author: iulius Revision: 9464 Rotate innfeed logs Exploder and process channels are now properly reopened when "ctlinnd flushlogs" is used, which is in particular the command invoked by scanlogs to rotate log files. It solves the issue that caused the patch to be reverted by commit [9450]. Modified: branches/2.5/doc/pod/news.pod branches/2.5/innd/cc.c branches/2.5/scripts/scanlogs.in ---------------------+ doc/pod/news.pod | 12 ++++++++++++ innd/cc.c | 14 +++++++++++++- scripts/scanlogs.in | 24 +++++++++++++++++++++++- 3 files changed, 48 insertions(+), 2 deletions(-) Modified: doc/pod/news.pod =================================================================== --- doc/pod/news.pod 2013-03-18 18:47:27 UTC (rev 9463) +++ doc/pod/news.pod 2013-03-18 18:48:18 UTC (rev 9464) @@ -1,3 +1,15 @@ +=head1 Changes in 2.5.4 + +=item * + +When using funnel feeds, B<innfeed> log files were open forever, which +resulted in empty log files, once rotated by B<scanlogs>. Exploder and +process channels are now reopened when C<ctlinnd flushlogs> is used, +which is in particular the command invoked by B<scanlogs> to rotate +log files. + +=back + =head1 Changes in 2.5.3 Please note that the HTML_STATUS compile-time option has been replaced Modified: innd/cc.c =================================================================== --- innd/cc.c 2013-03-18 18:47:27 UTC (rev 9463) +++ innd/cc.c 2013-03-18 18:48:18 UTC (rev 9464) @@ -629,11 +629,14 @@ /* -** Flush the log files. +** Flush the log files as well as exploder and process channels. */ static const char * CCflushlogs(char *unused[]) { + SITE *sp; + CHANNEL *cp; + int i; unused = unused; /* ARGSUSED */ if (Debug) @@ -643,6 +646,15 @@ syslog(L_NOTICE, "%s flushlogs %s", LogName, CCcurrmode()); ReopenLog(Log); ReopenLog(Errlog); + /* Flush exploder and process channels so that they take into account + * the new log files (for instance during log rotation). */ + for (sp = Sites, i = nSites; --i >= 0; sp++) { + if (((cp = sp->Channel) != NULL) + && ((cp->Type == CTexploder) || (cp->Type == CTprocess))) { + SITEflush(sp, true); + syslog(L_NOTICE, "%s flush", sp->Name); + } + } return NULL; } Modified: scripts/scanlogs.in =================================================================== --- scripts/scanlogs.in 2013-03-18 18:47:27 UTC (rev 9463) +++ scripts/scanlogs.in 2013-03-18 18:48:18 UTC (rev 9464) @@ -22,12 +22,21 @@ ## Where these programs, if used, write their logs. ## We also have to find innfeed's log file. CONTROLBATCH=${MOST_LOGS}/controlbatch.log +INNFEEDCONF=${PATHETC}/innfeed.conf +if [ -f "${INNFEEDCONF}" ]; then + INNFEEDLOG=`${AWK} '{gsub(/:|#/, " & ")} {if ($1 == "log-file" && $2 == ":") print $3}' ${INNFEEDCONF}` +fi +INNFEED= +for F in "${INNFEEDLOG}" ; do + test -f "${MOST_LOGS}/${F}" && INNFEED="${INNFEED} ${MOST_LOGS}/${F}" +done +test -z "${INNFEED}" && test -f "${MOST_LOGS}/innfeed.log" && INNFEED="${MOST_LOGS}/innfeed.log" NNTPSEND=${MOST_LOGS}/nntpsend.log PERLNOCEM=${MOST_LOGS}/perl-nocem.log SENDIHAVE=${MOST_LOGS}/send-ihave.log SENDNNTP=${MOST_LOGS}/send-nntp.log SENDUUCP=${MOST_LOGS}/send-uucp.log -LIVEFILES="${CONTROLBATCH} ${NNTPSEND} ${PERLNOCEM} ${SENDIHAVE} ${SENDNNTP} ${SENDUUCP}" +LIVEFILES="${CONTROLBATCH} ${INNFEED} ${NNTPSEND} ${PERLNOCEM} ${SENDIHAVE} ${SENDNNTP} ${SENDUUCP}" ## Where news.daily places expire output, unless noexplog was used. EXPLOG=${MOST_LOGS}/expire.log @@ -102,6 +111,9 @@ ctlinnd -s logmode PAUSED=false ctlinnd -s pause "Flushing log and syslog files" 2>&1 && PAUSED=true + + # First, flush log files to be sure everything has been recorded + # before rotating them. OUTPUT=`ctlinnd flushlogs 2>&1` if [ "$OUTPUT" != "Ok" -a "$OUTPUT" != "In debug mode" ]; then echo "$OUTPUT" @@ -148,6 +160,16 @@ ## Tally control messages if we logged them. test -n "${CONTROL_DATA}" && cat ${CONTROL_DATA} | ${TALLY_CONTROL} + # Flush again log files so that freshly rotated new log files + # are properly taken into account. + OUTPUT=`ctlinnd flushlogs 2>&1` + if [ "$OUTPUT" != "Ok" -a "$OUTPUT" != "In debug mode" ]; then + echo "$OUTPUT" + echo 'Cannot flush logs.' + rm -f ${LOCK} + exit 1 + fi + ${PAUSED} && ctlinnd -s go "Flushing log and syslog files" 2>&1 cd ${OLD} ------------------------------ _______________________________________________ inn-committers mailing list inn-committers@lists.isc.org https://lists.isc.org/mailman/listinfo/inn-committers End of inn-committers Digest, Vol 49, Issue 1 *********************************************