Bug 241766

Summary: Logrotate ignores pre/postrotating scripts arguments
Product: Red Hat Enterprise Linux 4 Reporter: Tomas Smetana <tsmetana>
Component: logrotateAssignee: Tomas Smetana <tsmetana>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: e.janz, mmalik, tao
Target Milestone: rcKeywords: EasyFix, Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0703 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-24 19:52:12 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:
Bug Depends On:    
Bug Blocks: 445554    
Attachments:
Description Flags
Proposed patch none

Description Tomas Smetana 2007-05-30 14:17:57 UTC
Description of problem:
Pre/postrotate script argument is ignored.

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

How reproducible:
Always.

Steps to Reproduce:

1. Create a test log:
   mkdir /tmp/test_log; echo "hi there" > /tmp/test_log/the_log

2. Create a test config file /tmp/test_log/config with the following content:
   /tmp/test_log/the_log {
        rotate 6
        compress
        missingok
        create
        postrotate
                echo $1
        endscript
   }

3. Run logrotate -f /tmp/test_log/config
  
Actual results:
An empty line is echoed.

Expected results:
"/tmp/test_log/the_log" is echoed.

Additional info:

Comment 1 Tomas Smetana 2007-05-30 14:17:57 UTC
Created attachment 155685 [details]
Proposed patch

Comment 2 RHEL Program Management 2007-05-30 14:25:48 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 3 Tomas Smetana 2007-08-03 11:16:16 UTC
Should I (or anyone) move this one to 4.7?

Comment 4 Tomas Smetana 2007-08-16 12:52:36 UTC
Moving to 4.7. This is not that serious.

Comment 5 RHEL Program Management 2007-08-16 12:56:28 UTC
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.

Comment 6 Eric Janz 2007-08-16 16:20:04 UTC
We would greatly appreciate if this bug gets solved in 4.5 ASAP because our
postrotate scripts do a couple of things with each log beeing rotated (
compress, move to another location, etc... )

By now, we rolled back the logrotate binary to version 3.7.1-5 and added
logrotate to the skip list in up2date, but this is a little bit painful ...

Thanks in advance.

Comment 9 Enzo 2008-03-13 08:36:41 UTC
Any status on a fix for this bug?


Comment 10 Tomas Smetana 2008-03-13 08:44:00 UTC
(In reply to comment #9)
> Any status on a fix for this bug?

Patch is ready, will be present in 4.7.

Comment 14 errata-xmlrpc 2008-07-24 19:52:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0703.html