Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 604073 - log deleted after "gzip: stdin: Input/output error"
log deleted after "gzip: stdin: Input/output error"
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: logrotate (Show other bugs)
6.0
All Linux
low Severity high
: rc
: ---
Assigned To: Jan Kaluža
Alex Sersen
:
Depends On: 567365
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-15 07:16 EDT by Jan Kaluža
Modified: 2013-10-31 21:33 EDT (History)
7 users (show)

See Also:
Fixed In Version: logrotate-3.7.8-12.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 567365
Environment:
Last Closed: 2010-11-10 16:06:24 EST
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 (453 bytes, patch)
2010-06-15 07:26 EDT, Jan Kaluža
no flags Details | Diff
proposed patch 2 (375 bytes, patch)
2010-06-24 08:54 EDT, Jan Kaluža
no flags Details | Diff

  None (edit)
Description Jan Kaluža 2010-06-15 07:16:02 EDT
+++ This bug was initially created as a clone of Bug #567365 +++

Description of problem:
Our logs for httpd are stored on NFS. After some temporary problem with NFS (not known yet) the logrotate was not able to compress one of the logs and removed it. I would suggest if logrotate receives some error from gzip it shouldn't remove original file and should keep it untouched. Some very important logs might be lost. 

This was sent by email: 

gzip: stdin: Input/output error 
error: unable to open /mnt/*****/logs/access.log.1 for compression

The config for rotation of these logs is following 

{
    daily
    missingok
    rotate 730
    compress
    delaycompress
    create 644 root root
    notifempty
    sharedscripts
    postrotate
        /sbin/service httpd reload > /dev/null 2>/dev/null || true
    endscript
}

Version-Release number of selected component (if applicable):
logrotate-3.7.4-9
Comment 2 Jan Kaluža 2010-06-15 07:26:39 EDT
Created attachment 424120 [details]
proposed patch

This patch fixes described bug.
Comment 3 RHEL Product and Program Management 2010-06-15 07:33:15 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 4 Jan Kaluža 2010-06-15 09:37:10 EDT
Committed in CVS, fixed in logrotate-3_7_8-9_el6.

http://post-office.corp.redhat.com/archives/cvs-commits-list/2010-June/msg01886.html
Comment 7 Jan Kaluža 2010-06-24 08:54:19 EDT
Created attachment 426558 [details]
proposed patch 2

Unfortunately, previous patch fixed only one possible problem. This patch fixes the second reason of this bug.

In my opinion, there is problem in renaming "log" to "log.1" when "rename"
function returns error code. In that case we shouldn't continue with rotation
process for that particular log, because "log.1" doesn't have to be created and
in next step we overwrite "log" (so it's lost).

The gzip error is showed only as result of non existing "log.1" file. After
applying this patch, rotation is stopped before the compress code.
Comment 8 Jan Kaluža 2010-06-24 09:02:19 EDT
Committed in CVS, fixed in logrotate-3.7.8-12.el6.

http://post-office.corp.redhat.com/archives/cvs-commits-list/2010-June/msg03355.html
Comment 11 releng-rhel@redhat.com 2010-11-10 16:06:24 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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