[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] fetchnews and logrotate?



I received the following cron message. From what I can tell the news log file
reached a size maximum during an active fetchnews. As a result, a large
portion of the log file to be rotated was lost and, from the message below,
the leafnode pointers were messed up.

Date: Fri, 16 Jan 2004 18:14:41 -0600 (CST) 
Subject: Cron <news@www> /usr/sbin/fetchnews 	All headers
 
Active has not been fetched completely in previous run
or has never been fetched, forcing active fetch.
Warning: skipping group "alt.", invalid name (NULL component).
Newsgroup name conflict: 3dfx.oem.products.diamond.monster3d vs.
3dfx.oem.products.diamond.monster3D
Newsgroup name conflict, chose 3dfx.oem.products.diamond.monster3d
Newsgroup name conflict: alt.binaries.pictures.erotica.fetish.latex vs.
alt.binaries.pictures.erotica.fetish.Latex
Newsgroup name conflict, chose alt.binaries.pictures.erotica.fetish.latex
...
Newsgroup name conflict, chose
symantec.support.devtools.windows.vcafe4java.runtime.native
spamcop not found in groupinfo file
spamcop.help not found in groupinfo file 

My news crontab contains

# crontab -l -u news
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.21913 installed on Fri Jan  9 08:31:51 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# min(0-59) hour(0-23)  day(1-31) month(1-12,jan) Day-of-Week(0-6,sun)  Command
# fetchnews 8 times a day
12 0-23/3 * * *  /usr/sbin/fetchnews
  
# fetchnews post every 5 minutes
0-59/5 * * * *  /etc/leafnode/chk_leaf_out
  
# check for expired articles daily
30 5 * * *  /etc/leafnode/leafnode.daily.cron

My news log rotation looks like:

# Newslog
/var/log/newslog  {
    missingok
    compress
    size 2M
    rotate 3
    create 0660 root news
}


Obviously, if the rotate occurs when fetchnews is writing to the log,
confusion will occur.

What would be the safest approach to take to keep this conflict from
happening? Some sort of postrotate check, but on what? 

Thanks, Mike.

-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
http://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/