Bug 100546 - logrotate incorrectly handles delaycompress + mailfirst
Summary: logrotate incorrectly handles delaycompress + mailfirst
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: logrotate
Version: 7.3
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Jay Turner
URL:
Whiteboard:
: 113764 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-23 10:46 UTC by David Tonhofer
Modified: 2015-01-08 00:05 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-01 16:16:09 UTC
Embargoed:


Attachments (Terms of Use)

Description David Tonhofer 2003-07-23 10:46:17 UTC
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
    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!

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 18:05:47 UTC
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 08:13:43 UTC
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 20:17:12 UTC
*** 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.