Bug 100546 - logrotate incorrectly handles delaycompress + mailfirst
logrotate incorrectly handles delaycompress + mailfirst
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: logrotate (Show other bugs)
7.3
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Jay Turner
:
: 113764 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-23 06:46 EDT by David Tonhofer
Modified: 2015-01-07 19:05 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-01 12:16:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Tonhofer 2003-07-23 06:46:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2)
Gecko/20030208 Netscape/7.02

Description of problem:
When logrotate is configured to 'delaycompress' and also
to 'mailfirst', it tries to find and send off a file ending
in .gz instead of the still uncompressed file.

Example: we want handle the HTTPD error logs:

/var/log/httpd/error_log {
    daily
    rotate 65
    nomissingok
    ifempty
    olddir /var/log/httpd/error_dir
    create 640 root mpfyrun
    mail techies@m-plify.com
    mailfirst
    compress
    delaycompress
    postrotate
        /usr/local/apache2/bin/apachectl graceful
        # there will be some activity on the saved log, so
        # don't compress
        # if you want to compress, sleep for 600 or use delaycompress
        # echo "Rotated httpd error_log"
    endscript
}

When this is run, logrotate gives an error:

sh: /var/log/httpd/error_dir/error_log.1.gz: No such file or directory
Failed to mail /var/log/httpd/error_dir/error_log.1.gz to techies@m-plify.com!

How reproducible:
Always

Expected Results:  
The still uncompressed file should be sent out. I expect the actual
code handling 'mailfirst' should not care about whether there is a compressed or
uncompressed file at place 1 in the logfile sequence.
Comment 1 Elliot Lee 2003-07-24 14:05:47 EDT
Please test the package in ftp://people.redhat.com/sopwith/logrotate-3.6.10-1.i386.rpm
and let me know if it fixes the problem.
Comment 2 David Tonhofer 2003-07-25 04:13:43 EDT
Installed ftp://people.redhat.com/sopwith/logrotate-3.6.10-1.i386.rpm
on RedHat 7.3

--> Problem is fixed, all right!

Comment 3 Elliot Lee 2004-02-20 15:17:12 EST
*** Bug 113764 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.