Bug 251596

Summary: Logrotate problem using the size config without any time config (daily, etc.)
Product: Red Hat Enterprise Linux 5 Reporter: joel winteregg <joel.winteregg>
Component: logrotateAssignee: Tomas Smetana <tsmetana>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: low    
Version: 5.0CC: joel.winteregg
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-13 07:48:32 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 joel winteregg 2007-08-09 21:45:52 UTC
Description of problem:
The "size" configuration statement of logrotate only works when a time config is
present ("daily", "weekly", etc..). So it seems the "size" config statement
behave like logrotate man page define its "minsize" config statement. I did many
testing and my log where only rotated when they were bigger than my size config
AND when a "daily" was configured.

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


How reproducible:

- Logrotate configuration -
# keep 1 year of logs (if daily rotation)
rotate 365 

# no rotation on empty log files
notifempty

# don't report an error on configurated log files which are missing
missingok

/path/to/my/dir/*.log {
    compress
    size=100k
}

Steps to Reproduce:
1. Remove the status file /var/lib/logrotate/status 
2. Launch logrotate with the given config

Actual results:
No logs are rotated


Expected results:
Logs > 100k should be rotated as gz file

Additional info:
If i add the "daily" config statement in the given config and then do what is
written in "Steps to Reproduce" and then if I change the OS date to simulate a
day later and launch logrotate again, it will rotate logs which are bigger than
100k !

Comment 1 Tomas Smetana 2007-08-13 07:48:32 UTC
This bug has the same cause as bug #247410. Marking as duplicate.

*** This bug has been marked as a duplicate of 247410 ***