Bug 3961

Summary: logrotate fails to execute create and postrotate in certain cases
Product: [Retired] Red Hat Linux Reporter: jens
Component: logrotateAssignee: Erik Troan <ewt>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 6.0   
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: 1999-11-22 16:46:00 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 jens 1999-07-09 09:39:31 UTC
When using logrotate with the following config for e.g.
squid:

/var/log/squid/squid.logrotate {
    daily
    rotate 0
    ifempty
    nomissingok
    create
    postrotate
      /usr/sbin/squid -k rotate
    endscript
}

logrotate does not do anything but removing
/var/log/squid/squid.logrotate - older log files
will not be removed, but even worse, no new log
file is created and the postrotate script is not
executed.
A simple workaround is to set the number of rotations
to "1". Then, logrotate does its job as expected.

BTW, logrotate does not react correctly on the --usage
argument. Refering to the man page, a usage message, a
version indicator and a copyright message will be displayed.
However, I can only see a usage message.

The version of the logrotate RPM is: logrotate-3.2-1

Comment 1 Preston Brown 2001-06-21 18:45:08 UTC
Both of these things have been addressed in logrotate 3.5.6 and later (Rawhide).

Better late than never.