Bug 64725

Summary: olddir used for some logs where it shouldn't
Product: [Retired] Red Hat Linux Reporter: Peter Surda <shurdeek>
Component: logrotateAssignee: Elliot Lee <sopwith>
Status: CLOSED NOTABUG QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-05-10 03:30:26 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:

Description Peter Surda 2002-05-10 03:30:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020326

Description of problem:
I tried to put rotated httpd logs (defined in /etc/logrotate.d/apache and
/etc/logrotate.d/apache.virtual_hosts) into a separate directory,
/var/log/httpd/old. So basically I put "olddir /var/log/httpd/old" into those 2
files. Unfortunately this setting is somehow kept in places where it shouldn't
because some (not all) other rotated logs, e.g. xferlog, wtmp, up2date, but not
messages or secure, are moved into that directory as well. I tried to fix the
bug myself but I'm too tired. RH 6.2 exhibits the same behaviour BTW.

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


How reproducible:
Always

Steps to Reproduce:
1. use olddir inside one of the files in /etc/logrotate.d directory
2. w8 a couple of days
3. some logs will appear in wrong place


Expected Results:  only specified logs should be there, not the other ones

Additional info:

Well I don't see from the code where it is triggered, searched for almost an
hour :-(. This is the 3rd time I'm posting a bug report via bugzilla, hopefully
this time it actually gets fixed. Did I mention I humbly paid my 60$ RHN fee
this year? :-)

Comment 1 Elliot Lee 2002-05-10 14:56:16 UTC
logrotate is designed (for or better or worse) to read its configs by doing
something like 'cat /etc/logrotate.conf /etc/logrotate.d/*'. This means that one
config file influences the operation across the board - you need to reset olddir
at the end of the config file where you modify it.