Bug 786801 - Rotation of wallaby agent logs wrongly affects old logs
Summary: Rotation of wallaby agent logs wrongly affects old logs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: wallaby
Version: 2.1
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: 2.3
: ---
Assignee: Will Benton
QA Contact: Tomas Rusnak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-02 12:26 UTC by Luigi Toscano
Modified: 2013-03-06 18:41 UTC (History)
4 users (show)

Fixed In Version: wallaby-0.16.1-1
Doc Type: Bug Fix
Doc Text:
C: Previous versions of the wallaby package included a logrotate recipe that spuriously affected archived logs. C: As a consequence, instead of having an orderly set of archived logs with names like "agent_log.1", "agent_log.2", and so on, the archived logs would have names like "agent_log.1", "agent_log.1.1", "agent_log.1.1.1", etc. F: The current wallaby package includes a corrected logrotate recipe. R: These problems should no longer present.
Clone Of:
Environment:
Last Closed: 2013-03-06 18:41:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0564 0 normal SHIPPED_LIVE Low: Red Hat Enterprise MRG Grid 2.3 security update 2013-03-06 23:37:09 UTC

Description Luigi Toscano 2012-02-02 12:26:29 UTC
Description of problem:
Rotation of logs affects also old logs that should not have been touched, wrongly increasing the number of log files.
More than this confused description it is worthy to see the effect on the /var/log/wallaby directory :
RHEL6:

-rw-r--r--. 1 wallaby condor      0 Jan 13 03:15 agent.log
-rw-r--r--. 1 wallaby condor      0 Dec  4 03:15 agent.log-20111120-20111127
-rw-r--r--. 1 wallaby condor      0 Dec 11 03:46 agent.log-20111120-20111127-20111204
-rw-r--r--. 1 wallaby condor      0 Dec 18 03:41 agent.log-20111120-20111127-20111204-20111211
-rw-r--r--. 1 wallaby condor      0 Dec 25 03:08 agent.log-20111120-20111127-20111204-20111211-20111218
-rw-r--r--. 1 wallaby condor      0 Jan  1 03:30 agent.log-20111120-20111127-20111204-20111211-20111218-20111225
-rw-r--r--. 1 wallaby condor      0 Jan  8 03:39 agent.log-20111120-20111127-20111204-20111211-20111218-20111225-20120101
-rw-r--r--. 1 wallaby condor      0 Jan 15 03:28 agent.log-20111120-20111127-20111204-20111211-20111218-20111225-20120101-20120108
-rw-r--r--. 1 wallaby condor      0 Jan 22 03:23 agent.log-20111120-20111127-20111204-20111211-20111218-20111225-20120101-20120108-20120115
-rw-r--r--. 1 wallaby condor      0 Jan 29 03:06 agent.log-20111120-20111127-20111204-20111211-20111218-20111225-20120101-20120108-20120115-20120122
-rw-r--r--. 1 wallaby condor    231 Jan 29 03:06 agent.log-20111120-20111127-20111204-20111211-20111218-20111225-20120101-20120108-20120115-20120122-20120129
-rw-r--r--. 1 wallaby condor      0 Dec 11 03:46 agent.log-20111127-20111204
-rw-r--r--. 1 wallaby condor      0 Dec 18 03:41 agent.log-20111127-20111204-20111211
-rw-r--r--. 1 wallaby condor      0 Dec 25 03:08 agent.log-20111127-20111204-20111211-20111218
-rw-r--r--. 1 wallaby condor      0 Jan  1 03:30 agent.log-20111127-20111204-20111211-20111218-20111225
-rw-r--r--. 1 wallaby condor      0 Jan  8 03:39 agent.log-20111127-20111204-20111211-20111218-20111225-20120101
-rw-r--r--. 1 wallaby condor      0 Jan 15 03:28 agent.log-20111127-20111204-20111211-20111218-20111225-20120101-20120108
-rw-r--r--. 1 wallaby condor      0 Jan 22 03:23 agent.log-20111127-20111204-20111211-20111218-20111225-20120101-20120108-20120115
-rw-r--r--. 1 wallaby condor      0 Jan 29 03:06 agent.log-20111127-20111204-20111211-20111218-20111225-20120101-20120108-20120115-20120122
-rw-r--r--. 1 wallaby condor 140725 Jan 29 03:06 agent.log-20111127-20111204-20111211-20111218-20111225-20120101-20120108-20120115-20120122-20120129
-rw-r--r--. 1 wallaby condor      0 Dec 11 03:46 agent.log-20111204
-rw-r--r--. 1 wallaby condor      0 Dec 18 03:41 agent.log-20111204-20111211
-rw-r--r--. 1 wallaby condor      0 Dec 25 03:08 agent.log-20111204-20111211-20111218
-rw-r--r--. 1 wallaby condor      0 Jan  1 03:30 agent.log-20111204-20111211-20111218-20111225
-rw-r--r--. 1 wallaby condor      0 Jan  8 03:39 agent.log-20111204-20111211-20111218-20111225-20120101
-rw-r--r--. 1 wallaby condor      0 Jan 15 03:28 agent.log-20111204-20111211-20111218-20111225-20120101-20120108
-rw-r--r--. 1 wallaby condor      0 Jan 22 03:23 agent.log-20111204-20111211-20111218-20111225-20120101-20120108-20120115
-rw-r--r--. 1 wallaby condor      0 Jan 29 03:06 agent.log-20111204-20111211-20111218-20111225-20120101-20120108-20120115-20120122
-rw-r--r--. 1 wallaby condor  15556 Jan 29 03:06 agent.log-20111204-20111211-20111218-20111225-20120101-20120108-20120115-20120122-20120129
-rw-r--r--. 1 wallaby condor      0 Dec 25 03:08 agent.log-20111217
-rw-r--r--. 1 wallaby condor      0 Jan  1 03:30 agent.log-20111217-20111225
-rw-r--r--. 1 wallaby condor      0 Jan  8 03:39 agent.log-20111217-20111225-20120101
-rw-r--r--. 1 wallaby condor      0 Jan 15 03:28 agent.log-20111217-20111225-20120101-20120108
-rw-r--r--. 1 wallaby condor      0 Jan 22 03:23 agent.log-20111217-20111225-20120101-20120108-20120115
-rw-r--r--. 1 wallaby condor      0 Jan 29 03:06 agent.log-20111217-20111225-20120101-20120108-20120115-20120122
-rw-r--r--. 1 wallaby condor   7955 Jan 29 03:06 agent.log-20111217-20111225-20120101-20120108-20120115-20120122-20120129
-rw-r--r--. 1 wallaby condor      0 Dec 25 03:08 agent.log-20111220
-rw-r--r--. 1 wallaby condor      0 Jan  1 03:30 agent.log-20111220-20111225
-rw-r--r--. 1 wallaby condor      0 Jan  8 03:39 agent.log-20111220-20111225-20120101
-rw-r--r--. 1 wallaby condor      0 Jan 15 03:28 agent.log-20111220-20111225-20120101-20120108
-rw-r--r--. 1 wallaby condor      0 Jan 22 03:23 agent.log-20111220-20111225-20120101-20120108-20120115
-rw-r--r--. 1 wallaby condor      0 Jan 29 03:06 agent.log-20111220-20111225-20120101-20120108-20120115-20120122
-rw-r--r--. 1 wallaby condor    123 Jan 29 03:06 agent.log-20111220-20111225-20120101-20120108-20120115-20120122-20120129
-rw-r--r--. 1 wallaby condor      0 Jan 15 03:28 agent.log-20120113
-rw-r--r--. 1 wallaby condor      0 Jan 22 03:23 agent.log-20120113-20120115
-rw-r--r--. 1 wallaby condor      0 Jan 29 03:06 agent.log-20120113-20120115-20120122
-rw-r--r--. 1 wallaby condor  85693 Jan 29 03:06 agent.log-20120113-20120115-20120122-20120129


RHEL5 is affected too, but with a different pattern (which I guess depends on logrotate):
-rw-r--r-- 1 wallaby wallaby      0 Nov  6 04:02 agent.log
-rw-r--r-- 1 wallaby wallaby      0 Nov 13 04:02 agent.log.1
-rw-r--r-- 1 wallaby wallaby      0 Nov 20 04:02 agent.log.1.1
-rw-r--r-- 1 wallaby wallaby      0 Nov 27 04:02 agent.log.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Dec  4 04:02 agent.log.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Dec 11 04:02 agent.log.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Dec 18 04:02 agent.log.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Dec 25 04:02 agent.log.1.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Jan  1 04:02 agent.log.1.1.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Jan  8 04:02 agent.log.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Jan 15 04:02 agent.log.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Jan 22 04:02 agent.log.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby      0 Jan 29 04:02 agent.log.1.1.1.1.1.1.1.1.1.1.1.1
-rw-r--r-- 1 wallaby wallaby 626414 Jan 29 04:02 agent.log.1.1.1.1.1.1.1.1.1.1.1.1.1



I suspect that this can be easily fixed by changing the glob pattern in /etc/logrotate.d/wallaby from:

/var/log/wallaby/* {

to 

/var/log/wallaby/*.log {

but I did not try
Version-Release number of selected component (if applicable):
wallaby-0.12.2-1

Comment 1 Will Benton 2012-02-23 15:01:30 UTC
Fixed upstream.

Comment 2 Will Benton 2012-03-20 14:33:15 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C:  Previous versions of the wallaby package included a logrotate recipe that spuriously affected archived logs.
C:  As a consequence, instead of having an orderly set of archived logs with names like "agent_log.1", "agent_log.2", and so on, the archived logs would have names like "agent_log.1", "agent_log.1.1", "agent_log.1.1.1", etc.
F:  The current wallaby package includes a corrected logrotate recipe.
R:  These problems should no longer present.

Comment 4 Tomas Rusnak 2012-11-27 14:53:15 UTC
Reproduced with:

wallaby-0.12.5-1.el5

# cat /etc/logrotate.d/wallaby
/var/log/wallaby/* {
    notifempty
    missingok
    copytruncate

-rw-r--r--  1 wallaby wallaby    152 Nov 27 09:33 agent.log
-rw-r--r--  1 wallaby wallaby      0 Jun 10 04:02 agent.log.1
-rw-r--r--  1 wallaby wallaby      0 Jun 17 04:02 agent.log.1.1
-rw-r--r--  1 wallaby wallaby      0 Jun 24 04:02 agent.log.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Jul  1 04:02 agent.log.1.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Jul  8 04:02 agent.log.1.1.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Jul 15 04:02 agent.log.1.1.1.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Jul 22 04:02 agent.log.1.1.1.1.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Jul 29 04:02 agent.log.1.1.1.1.1.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Aug  5 04:02 agent.log.1.1.1.1.1.1.1.1.1
-rw-r--r--  1 wallaby wallaby      0 Aug 12 04:02 agent.log.1.1.1.1.1.1.1.1.1.1
-rw-r--r--  1 wallaby wallaby 170215 Aug 12 04:02 agent.log.1.1.1.1.1.1.1.1.1.1.1

Retested on RHEL5/6 with:

wallaby-0.16.1-2

# cat /etc/logrotate.d/wallaby 
/var/log/wallaby/*.log {
    notifempty
    missingok
    copytruncate

-rw-r--r--.  1 wallaby condor      0 Nov 26 04:34 agent.log
-rw-r--r--.  1 wallaby condor  13238 Nov 19 04:07 agent.log-20121119
-rw-r--r--.  1 wallaby condor  38188 Nov 26 04:34 agent.log-20121126

Logrotate script was repaired and log files looks ok, now.

>>> VERIFIED

Comment 6 errata-xmlrpc 2013-03-06 18:41:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0564.html


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