Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 230974

Summary: false order in /etc/cron.daily
Product: Red Hat Enterprise Linux 5 Reporter: ilja lunev <uxadm>
Component: logwatchAssignee: Ivana Varekova <varekova>
Status: CLOSED ERRATA QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0Keywords: Reopened
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0303 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:59:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
diff from logwatch.conf files none

Description ilja lunev 2007-03-05 08:17:41 UTC
Description of problem:
false order in /etc/cron.daily
logwatch and tmpwatch affected:

we get daily this error message from cron daemon:
"etc/cron.daily/0logwatch:

You have old files in your logwatch tmpdir (/tmp):
	logwatch.12M0hB98
The directories listed above were most likely created by a
logwatch run that failed to complete successfully.  If so, you
may delete these directories."

This is because logwatch cronjob started before tmpwatch?

Version-Release number of selected component (if applicable):


How reproducible:
everyday per cron

Steps to Reproduce:
1.
2.
3.
  
Actual results:
error email message daily, tmp directory is cleaning only at the next night

Expected results:
no email, no directories like /tmp/logwatch.* after tmpwatch or (better)
logwatch has been done

Additional info:

Comment 1 Marcela Mašláňová 2007-03-05 10:42:45 UTC
Problem of logwatch.

Comment 2 Ivana Varekova 2007-03-05 10:54:31 UTC
This log message is generated by logwatch - logwatch tests whether in
/tmp/logwatch does not remain old tmp files. If there is any then logwatch
reports this error message  - if everything works right logwatch removes the
files when it finish its work - so there should not remain any. There is no need
to clean this files - it is necessary only if logwatch was killed during its work. 
So perhaps your logwatch process is killed or you call logwatch twice and the
second finds tmp files of the first (which is still running) and report it as a
problem.

Comment 3 ilja lunev 2007-03-05 12:28:42 UTC
logwatch don't be killed and nobody calls it twice. This work is handled by cron
service (at 4 a.m).

from cron log:
Mar  5 04:02:01 bbl1lnp8 crond[23964]: (root) CMD (run-parts /etc/cron.daily)
# ls /etc/cron.daily/
0anacron   cups       makewhatis.cron  prelink  rpm          tmpwatch
0logwatch  logrotate  mlocate.cron     RCS      service_run  yum.cron


The problem is the logwatch starts as first of the cron.daily scripts (because 
0logwatch - leading zero)  and the tmpwatch starts later. Supposedly logwatch
did't remain old tmp files. My opinion is the tmpwatch must do it before the 
0logwatch script has been started.

Comment 4 Ivana Varekova 2007-03-05 13:11:47 UTC
Logwatch should remove its temporary files itself - and it works right for me.

Comment 5 ilja lunev 2007-03-05 13:43:11 UTC
Created attachment 149261 [details]
diff from logwatch.conf files

Comment 6 ilja lunev 2007-03-05 13:44:24 UTC
we have about 150 RHEL WS 3 and WS4 systems on our site. We have never this kind
of the problem with logwatch. recently we had installed three RHEL WS 5 beta 2
and they all have this problem. Not daily, but very frequently. We use for all
our systems same logwatch.conf file. The difference from the original
logwatch.conf file see pls. in attachment.


Comment 7 Ivana Varekova 2007-03-05 14:48:54 UTC
In rhel3,4 there were no test whether logwatch tmp files are removed. This test
was added to version which is in rhel5. Probably there could be add some option
which can switch off these messages. 

Comment 8 ilja lunev 2007-03-06 07:36:38 UTC
thank you, this is a good news. And how we can add this option? I can't see any
reason for it, during the tmpwatch tool will do this work and the tmp dirs are
still very small for modern systems.

Comment 9 Ivana Varekova 2007-03-06 11:24:53 UTC
There is no option yet - but this bz should be take as a feature request for
this option. 
tmp dirs should be quite large especially for web servers and if the tmp log
file remains there could be no process which will remove them so the log message
could be really useful in this case.

Comment 10 ilja lunev 2007-03-06 12:12:10 UTC
many thanks for your assistance. I don't have any questions yet.

best regards,

Ilja

Comment 12 RHEL Program Management 2007-10-26 07:34:42 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 17 errata-xmlrpc 2008-05-21 15:59:45 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0303.html