Bug 133077 - logrotate script may cause lost data
Summary: logrotate script may cause lost data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: psacct
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-21 15:07 UTC by Sean Dilda
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: RHBA-2005-167
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-19 23:39:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:167 0 normal SHIPPED_LIVE psacct bug fix update 2005-06-09 04:00:00 UTC
Red Hat Product Errata RHBA-2005:211 0 normal SHIPPED_LIVE psacct bug fix update 2005-05-19 04:00:00 UTC

Description Sean Dilda 2004-09-21 15:07:54 UTC
The default logrotate script for psacct may cause lost data.

The prerotate script calls 'accton' with no arguments which stops
logging of process accounting until the postrotate script is called. 
Any processes that exit during this period will not be properly
accounted for.

I've tested and verified that if you have process accounting enabled,
then run 'accton' pointing to a new file, it will auotmatically switch
logging over with no period for processes to exit and not get
accounted for.  The kernel's logging is to the inode and not the
filename, so it will follow a file if its moved.  As such, I suggest
removing the 'prerotate' script from the default logrotate config.

I've tested this for a few weeks and it works without problem.  I read
the logrotate code and verified that the log file compression takes
place after the postrotate script, so that won't cause any problems
either.

Comment 1 Tim Powers 2005-05-19 23:39:14 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 the 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-2005-211.html



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