Bug 1115997 - "/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.
Summary: "/etc/logrotate.d/libvirtd" file is having multiple entries of "/var/log/libv...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.3.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: 3.4.2
Assignee: Douglas Schilling Landgraf
QA Contact: movciari
URL:
Whiteboard: infra
: 1080107 1115357 (view as bug list)
Depends On:
Blocks: 1123858
TreeView+ depends on / blocked
 
Reported: 2014-07-03 13:23 UTC by Udayendu Sekhar Kar
Modified: 2019-09-12 07:55 UTC (History)
19 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-09-04 12:59:37 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd.conf from host1 (13.57 KB, text/plain)
2014-07-09 10:48 UTC, Udayendu Sekhar Kar
no flags Details
libvirtd.conf from host2 (13.38 KB, text/plain)
2014-07-09 10:48 UTC, Udayendu Sekhar Kar
no flags Details
logs (309.58 KB, application/gzip)
2014-08-25 15:25 UTC, movciari
no flags Details
etc (12.68 MB, application/gzip)
2014-08-25 15:26 UTC, movciari
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1119473 0 None None None Never
Red Hat Product Errata RHBA-2014:1152 0 normal SHIPPED_LIVE vdsm 3.4.2 bug fix and enhancement update 2014-09-04 16:58:31 UTC
oVirt gerrit 29731 0 ovirt-3.4 MERGED libvirt_configure.sh: Unpersist logrotate libvirt 2020-01-30 16:30:49 UTC

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


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