Bug 703995 - Fix log rotation for ovirt.log and brcm-iscsi.log
Summary: Fix log rotation for ovirt.log and brcm-iscsi.log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ovirt-node
Version: 5.6
Hardware: All
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 633919
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-11 19:58 UTC by Chris Pelland
Modified: 2011-10-09 21:59 UTC (History)
10 users (show)

Fixed In Version: ovirt-node-1.0-54.2.el5_6.7
Doc Type: Bug Fix
Doc Text:
Prior to this update, "/var/log/brcm-iscsi.log" file was not log-rotated by default. With this update, log rotation of the "/var/log/brcm-iscsi.log" file is enabled to prevent it from growing indefinitely. Additionally, a previously existing bug was discovered that prevented the "/var/log/ovirt.log" file from being rotated. This update fixes this issue, and log rotatation for the "/var/log/ovirt.log" file works as expected.
Clone Of:
: 742125 (view as bug list)
Environment:
Last Closed: 2011-06-06 15:09:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (715 bytes, patch)
2011-05-11 20:15 UTC, Mike Burns
no flags Details | Diff
Follow-up patch (784 bytes, patch)
2011-05-17 12:32 UTC, Mike Burns
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0851 0 normal SHIPPED_LIVE rhev-hypervisor bug fix and enhancement update 2011-06-06 15:09:00 UTC

Description Chris Pelland 2011-05-11 19:58:30 UTC
This bug has been copied from bug #633919 and has been proposed
to be backported to 5.6 z-stream (EUS).

Comment 3 Mike Burns 2011-05-11 20:15:58 UTC
Created attachment 498387 [details]
Patch

Comment 5 Ying Cui 2011-05-17 08:29:44 UTC
Test this bug on 5.6-11. it is not fixed enough, the /etc/cron.d/ovirt-logrotate set is incorrect with /etc/logrotate.d/ovirt-logrotate.conf setting.

1. vi #/etc/logrotate.d/ovirt-node
/var/log/ovirt*.log /var/log/mcelog /var/log/brcm-iscsi.log {
    rotate 3
    compress
    missingok
    size 1M
    create
}
2. #ll /etc/logrotate.d/ 
total 36
-rw-r--r-- 1 root root 144 Dec 17  2009 acpid
-rw-r--r-- 1 root root 163 Apr 19 11:05 libvirtd
-rw-r--r-- 1 root root 127 May 17 07:48 ovirt-node
-rw-r--r-- 1 root root  61 Nov 17 07:25 rpm
-rw-r--r-- 1 root root 154 Apr 28  2010 snmpd
-rw-r--r-- 1 root root 306 Jan 22  2008 syslog
-rw-r--r-- 1 root root  32 Nov 13  2007 up2date
-rw-r--r-- 1 root root 173 Jan 24  2010 vdsm
-rw-r--r-- 1 root root 157 Oct 31  2009 vdsm-reg

3.# cat /etc/cron.d/ovirt-logrotate 
# Run each log rotation every 10 minutes
*/10 * * * * root /usr/sbin/logrotate /etc/logrotate.d/ovirt-logrotate.conf
*/10 * * * * root /usr/sbin/logrotate /etc/logrotate.d/syslog

Actual result:
in /etc/cron.d/ovirt-logrotate file, there should set ovirt-node for cron, but not ovirt-logrotate.conf. under /etc/logrotate.d/, there is no ovirt-logrotate.conf.

expected result:
in /etc/cron.d/ovirt-logrotate file, it should set 
*/10 * * * * root /usr/sbin/logrotate /etc/logrotate.d/ovirt-node

Comment 8 Mike Burns 2011-05-17 12:32:45 UTC
Created attachment 499344 [details]
Follow-up patch

Comment 9 Ying Cui 2011-05-24 02:49:00 UTC
Verified this bug on rhevh 5.6-11.1 build. 

The /var/log/brcm-iscsi.log can be rotated when its size > 1M.

# cat /etc/logrotate.d/ovirt-node 
/var/log/ovirt*.log /var/log/mcelog /var/log/brcm-iscsi.log {
    rotate 3
    compress
    missingok
    size 1M
    create
}
# cat /etc/cron.d/ovirt-logrotate 
# Run each log rotation every 10 minutes
*/10 * * * * root /usr/sbin/logrotate /etc/logrotate.d/ovirt-node
*/10 * * * * root /usr/sbin/logrotate /etc/logrotate.d/syslog

Pls change the bug status to 'ON-QA', after that I will change it to 'Verified'.

Comment 11 Ying Cui 2011-05-24 05:43:15 UTC
Verified on rhevh 5.6-11.1 build.

Comment 12 Mike Burns 2011-06-02 13:33:10 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:
The brcm-iscsi.log file is not logrotated by default.  This patch enables log rotation to prevent it from growing indefinitely.
Also, a previously existing bug was discovered that prevented ovirt.log from getting rotated.  This bug was also fixed.

Comment 13 Martin Prpič 2011-06-02 15:06:44 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,2 +1 @@
-The brcm-iscsi.log file is not logrotated by default.  This patch enables log rotation to prevent it from growing indefinitely.
+Prior to this update, "/var/log/brcm-iscsi.log" file was not log-rotated by default. With this update, log rotation of the "/var/log/brcm-iscsi.log" file is enabled to prevent it from growing indefinitely. Additionally, a previously existing bug was discovered that prevented the "/var/log/ovirt.log" file from being rotated. This update fixes this issue, and log rotatation for the "/var/log/ovirt.log" file works as expected.-Also, a previously existing bug was discovered that prevented ovirt.log from getting rotated.  This bug was also fixed.

Comment 14 errata-xmlrpc 2011-06-06 15:09:10 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-2011-0851.html


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