Bug 461494 - Bad exit code when logrotate.status is corrupt (0)
Bad exit code when logrotate.status is corrupt (0)
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: logrotate (Show other bugs)
5.4
All Linux
low Severity low
: rc
: ---
Assigned To: Jan Kaluža
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-08 11:27 EDT by Chris Ward
Modified: 2013-04-15 04:59 EDT (History)
2 users (show)

See Also:
Fixed In Version: logrotate-3.7.4-12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-18 10:57:32 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)
proposed patch (598 bytes, patch)
2009-09-04 09:31 EDT, Daniel Novotny
no flags Details | Diff

  None (edit)
Description Chris Ward 2008-09-08 11:27:36 EDT
Description of problem:
While testing bug 431836 I noticed that when /var/lib/logrotate.status is corrupt, logrotate exits with error messages, but with exit code of 0, which indicates a success.


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

How reproducible:
always

Steps to Reproduce:
%> logrotate -f /etc/logrotate.d/yum
error: bad line 2 in state file /var/lib/logrotate.status
error: could not read state file, will not attempt to write into it
$> echo $?
0
  
Actual results:
exit code 0

Expected results:
exit code >= 1
Comment 1 Tomas Smetana 2008-09-08 12:39:34 EDT
You're right -- the corrupted status file should be indicated somehow.  I believe this error is also present in the latest upstream version.

Thanks.
Comment 2 Tomas Smetana 2008-09-09 03:55:52 EDT
Adding Dan to cc list -- he should become the logrotate maintainer for RHEL in short time.  Also a patch was commited upstream (rev. 258).
Comment 3 Daniel Novotny 2009-09-04 09:31:44 EDT
Created attachment 359810 [details]
proposed patch
Comment 7 RHEL Product and Program Management 2011-01-11 15:39:35 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 8 RHEL Product and Program Management 2011-01-11 18:00:35 EST
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.
Comment 13 errata-xmlrpc 2011-05-18 10:57:32 EDT
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-2011-0816.html

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