Bug 508015

Summary: Libvirt don't clear logs
Product: [Community] Virtualization Tools Reporter: zyphos
Component: libvirtAssignee: Daniel Veillard <veillard>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: berrange, crobinso, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-06-25 12:37:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zyphos 2009-06-25 07:13:52 UTC
Description of problem:
Can not start VM if VM's log size exceed 2147627562 Bytes (2,1GB)

Version-Release number of selected component (if applicable):
libvirt 6.1

How reproducible:
Fill logs of a VM, /var/log/libvirt/qemu/domain_name.log
until 2,1Go
You will notice an error message, "can't start domain", that's all.

Comment 1 Daniel Berrangé 2009-06-25 09:04:32 UTC
libvirt provides a logrotate config file which rotates and compresses these log files on a daily basis. Did you really generate 2 GB of logs in < 1 day ?

Comment 2 zyphos 2009-06-25 12:13:57 UTC
Log rotate seems to ignore libvirt:
"Ignoring libvirtd.dpkg-new, because of .dpkg-new ending"

renaming "libvirtd.dpkg-new" to "libvirtd" solve the problem.

By default, libvirt log system seems to be at debug level. It should be at error level.

part of log file:
"char device redirected to /dev/pts/1
char device redirected to /dev/pts/2
info cpus
* CPU #0: pc=0x00000000000ffff0 thread_id=6123
cont
info blockstats
ide0-hd0: rd_bytes=512 wr_bytes=0 rd_operations=1 wr_operations=0
ide1-cd0: rd_bytes=512 wr_bytes=0 rd_operations=1 wr_operations=0
floppy0: rd_bytes=0 wr_bytes=0 rd_operations=0 wr_operations=0
sd0: rd_bytes=0 wr_bytes=0 rd_operations=0 wr_operations=0
info blockstats
ide0-hd0: rd_bytes=512 wr_bytes=0 rd_operations=1 wr_operations=0
ide1-cd0: rd_bytes=512 wr_bytes=0 rd_operations=1 wr_operations=0
floppy0: rd_bytes=0 wr_bytes=0 rd_operations=0 wr_operations=0
sd0: rd_bytes=0 wr_bytes=0 rd_operations=0 wr_operations=0
info blockstats
"

Comment 3 Daniel Berrangé 2009-06-25 12:37:34 UTC
The first problem with .dkpg-new file name is a Debian packaging bug - you should report that to your OS distribution.

The second problem has been addressed in the 0.6.3 libvirt release.