Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1115997

Summary: "/etc/logrotate.d/libvirtd" file is having multiple entries of "/var/log/libvirt/libvirtd.log" after upgrading the host to "rhev-hypervisor6-6.5-20140603.2" version.
Product: Red Hat Enterprise Virtualization Manager Reporter: Udayendu Sekhar Kar <ukar>
Component: vdsmAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED ERRATA QA Contact: movciari
Severity: high Docs Contact:
Priority: high    
Version: 3.3.0CC: acathrow, bazulay, danken, dougsland, eedri, fdeutsch, howey.vernon, iheim, jboggs, jhunsaker, lbopf, lpeer, mkalinin, oourfali, rpai, sherold, ukar, yeylon, yobshans
Target Milestone: ---Keywords: ZStream
Target Release: 3.4.2   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, duplicate entries were being created in /etc/logroate.d/libvirtd, because the logs were not being rotated correctly. Now, previous content is backed up prior to a new entry being added, and libvirt logs are rotated successfully.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-04 12:59:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1123858    
Attachments:
Description Flags
libvirtd.conf from host1
none
libvirtd.conf from host2
none
logs
none
etc none

Description Udayendu Sekhar Kar 2014-07-03 13:23:26 UTC
Description of problem:
"/etc/logrotate.d/libvirtd" file is having multiple entries of "/var/log/libvirt/libvirtd.log" after upgrading the host to "rhev-hypervisor6-6.5-20140603.2" version.

# cat /etc/logrotate.d/libvirtd

## beginning of configuration section by vdsm
/var/log/libvirt/libvirtd.log {
    rotate 100
    missingok
    copytruncate
    size 15M
    compress
    compresscmd /usr/bin/xz
    uncompresscmd /usr/bin/unxz
    compressext .xz
}
## end of configuration section by vdsm
/var/log/libvirt/libvirtd.log {
        weekly
        missingok
        rotate 4
        compress
        delaycompress
        copytruncate
        minsize 100k
}


Version-Release number of selected component (if applicable):
rhev-hypervisor6-6.5-20140603.2

How reproducible:
100%

Steps to Reproduce:
1. Upgrade the host to rhev-hypervisor6-6.5-20140603.2 version
2. Then open "/etc/logrotate.d/libvirtd" file to see the multiple similar entries.


Actual results:
Multiple similar entries are available under "/etc/logrotate.d/libvirtd" file after the host upgrade to rhev-hypervisor6-6.5-20140603.2 version.

Expected results:
Multiple entries should not be there.

Comment 1 Douglas Schilling Landgraf 2014-07-09 07:26:33 UTC
Hi Udayendu,

Please update the knowledge base that we must keep the below configuration the other should be commented. 

## beginning of configuration section by vdsm
/var/log/libvirt/libvirtd.log {
    rotate 100
    missingok
    copytruncate
    size 15M
    compress
    compresscmd /usr/bin/xz
    uncompresscmd /usr/bin/unxz
    compressext .xz
}

Thanks!

Comment 2 Fabian Deutsch 2014-07-09 07:44:53 UTC
*** Bug 1115357 has been marked as a duplicate of this bug. ***

Comment 4 Udayendu Sekhar Kar 2014-07-09 10:48:22 UTC
Created attachment 916715 [details]
libvirtd.conf from host1

Comment 5 Udayendu Sekhar Kar 2014-07-09 10:48:47 UTC
Created attachment 916716 [details]
libvirtd.conf from host2

Comment 8 Yaniv Bronhaim 2014-07-13 06:35:37 UTC
*** Bug 1080107 has been marked as a duplicate of this bug. ***

Comment 10 Milan Zelenka 2014-07-21 09:22:34 UTC
Same problems after update

from: RHEV-H 6.5 20140407.0.el6ev
to: RHEV-H 6.5 20140624.0.el6ev


Problems:
1. Multiple entries of libvirtd.log in logrotate config
2. Bad location of libvird.log (which is in /var/log, but logrotate's destination is /var/log/libvirtd/ after update).

I think second problem is not related to this BZ and it was commented in BZ#1080107 (marked as duplicate of this BZ).

Info from old (20140407.0.el6ev) version:

[root@lbch-02 ~]# cat /etc/logrotate.d/libvirtd
# vdsm
/var/log/libvirtd.log {
    rotate 100
    missingok
    copytruncate
    size 15M
    compress
    compresscmd /usr/bin/xz
    uncompresscmd /usr/bin/unxz
    compressext .xz
}
# end vdsm
/var/log/libvirt/libvirtd.log {
        weekly
        missingok
        rotate 4
        compress
        delaycompress
        copytruncate
        minsize 100k
}

[root@lbch-02 ~]# cat /etc/libvirt/libvirtd.conf |grep log_outputs
# log_outputs="3:syslog:libvirtd"
log_outputs="1:file:/var/log/libvirtd.log"


Info from new (20140624.0.el6ev) version:

[root@lbch-01 ~]# cat /etc/logrotate.d/libvirtd
## beginning of configuration section by vdsm
/var/log/libvirt/libvirtd.log {
    rotate 100
    missingok
    copytruncate
    size 15M
    compress
    compresscmd /usr/bin/xz
    uncompresscmd /usr/bin/unxz
    compressext .xz
}
## end of configuration section by vdsm
## beginning of configuration section by vdsm
/var/log/libvirt/libvirtd.log {
    rotate 100
    missingok
    copytruncate
    size 15M
    compress
    compresscmd /usr/bin/xz
    uncompresscmd /usr/bin/unxz
    compressext .xz
}
## end of configuration section by vdsm
/var/log/libvirt/libvirtd.log {
        weekly
        missingok
        rotate 4
        compress
        delaycompress
        copytruncate
        minsize 100k
}

[root@lbch-01 ~]# cat /etc/libvirt/libvirtd.conf |grep log_outputs
# log_outputs="3:syslog:libvirtd"
log_outputs="1:file:/var/log/libvirtd.log"



On updated host (lbch-01, version 20140624.0.el6ev) libvirtd.log is not rotated and /var/log partition was completely filled in 3 days after update...

Comment 11 Douglas Schilling Landgraf 2014-07-30 17:25:30 UTC
*** Bug 1115357 has been marked as a duplicate of this bug. ***

Comment 12 movciari 2014-08-25 15:24:33 UTC
tried to verify when upgrading from rhevh-6.5-20140603.2 to rhev-hypervisor6-6.5-20140821.1.el6ev.noarch.rpm and i still have 2 same vdsm entries in /etc/logrotate.d/libvirtd
i will attach all the logs and confs in case you need something more than libvirtd.conf

Comment 13 movciari 2014-08-25 15:25:10 UTC
Created attachment 930575 [details]
logs

Comment 14 movciari 2014-08-25 15:26:08 UTC
Created attachment 930576 [details]
etc

Comment 15 movciari 2014-08-26 11:53:08 UTC
sorry, i didn't realize upgrade actually failed, now that upgrade passed config is correct

Comment 16 Douglas Schilling Landgraf 2014-08-26 12:08:18 UTC
(In reply to movciari from comment #15)
> sorry, i didn't realize upgrade actually failed, now that upgrade passed
> config is correct

Ok, nice!

Comment 19 errata-xmlrpc 2014-09-04 12:59:37 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/RHBA-2014-1152.html