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

Bug 1115357

Summary: [Scale] VDSM fills all disk space while host has a big amount of VMs (185 )
Product: Red Hat Enterprise Virtualization Manager Reporter: Yuri Obshansky <yobshans>
Component: ovirt-nodeAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 3.4.0CC: bazulay, cshao, fdeutsch, gklein, gouyang, hadong, huiwa, iheim, leiwang, lpeer, michal.skrivanek, pstehlik, s.kieske, yaniwang, ybronhei, ycui, yeylon, yobshans
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: node
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-30 17:25:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Snapshot
none
libvirt log
none
vdsm log none

Description Yuri Obshansky 2014-07-02 08:55:58 UTC
Description of problem:
VDSM fills all disk space while host has a big amount of VMs
In my case - 185 VMs
It started when we create more that 100 VMs 
RHEVM throws errors "Critical, Low disk space. Host HOST-REAL has less than 500 MB of free space left on: /var/log." every 15 minutes

Version-Release number of selected component (if applicable):
RHEVM 3.4.1-0.23.el6ev
OS Version: RHEV Hypervisor - 6.5 - 20140624.0.el6ev
Kernel Version: 2.6.32 - 431.20.3.el6.x86_64
KVM Version: 0.12.1.2 - 2.415.el6_5.10
LIBVIRT Version: libvirt-0.10.2-29.el6_5.9
VDSM Version: vdsm-4.14.7-3.el6ev

How reproducible:
100 %

Steps to Reproduce:
1. Create more than 100 VMs
2. See RHEVM Event tab
3.

Actual results:
RHEVM throws errors "Critical, Low disk space. Host HOST-REAL has less than 500 MB of free space left on: /var/log." every 15 minutes

Expected results:
No errors

Additional info:

Comment 1 Yuri Obshansky 2014-07-02 08:56:48 UTC
Created attachment 914070 [details]
Snapshot

Comment 2 Sven Kieske 2014-07-02 12:58:11 UTC
This might be related to log levels and excessive libvirt logs.
at least on my production and dev machines these logs are by far the largest, even if you rotate them.

Comment 3 Michal Skrivanek 2014-07-02 14:44:47 UTC
(In reply to Sven Kieske from comment #2)
indeed

libvirtd   8726    root    4w   REG  253,8 1638998016   34 /var/log/libvirtd.log (deleted)

we should revisit the setting for libvirt. Other seemed fine...

Comment 4 Michal Skrivanek 2014-07-02 14:47:15 UTC
requesting backport as I saw that couple of times at various setups and we lost invaluable logs because of that, which prevented a proper analysis of what was actually going on

Comment 5 Sven Kieske 2014-07-02 14:53:47 UTC
but this does not just affect node?
also: isn't this about logging less information and not more?
so you will lose even more information?

or can the libvirt log get tuned in a way to contain less "spam"?

fyi: this is at least present since ovirt 3.3

Comment 6 Michal Skrivanek 2014-07-02 15:07:26 UTC
(In reply to Sven Kieske from comment #5)
well, i saw issues exclusively on node due to it's limited /var/log partition.
You had issues on a "full" host?
the one i mentioned, 1.6GB…it's a lot, but should not really cause issues…

to me it's most urgent to solve this for node (either extend /var/log/ or limit the verboseness or rotate more often)

Comment 7 Sven Kieske 2014-07-02 15:59:09 UTC
well I have not an issue that my /var/log is full, as it's a centos based host.
but storage does cost something so I really like to use as little as necessary :)
and I like to use it for different things than logs.

and multiple gigabytes of logs really should just be stored if you really need
them (unfortunately this seems to be the case for ovirt).

So I'm looking forward to newer versions of ovirt where the default loglevels
will be "info" or "warning" instead of "debug" for production.

PS: supporting central syslog servers would ease the pain of this, too.

Comment 8 Fabian Deutsch 2014-07-03 12:33:45 UTC
Yaniv, do you know if vdsm is setting the libvirt log interval?

Yuri, is this more a problem about not enough logging space or the space filling up to quickly?

Comment 9 Sven Kieske 2014-07-03 12:59:24 UTC
I'd also suggest to take a real look at the logs, and to decide
if they contain useful information, or maybe something spams the same
messages over and over again, and maybe this can be reduced, thus the logs
do not grow so fast and large.

Comment 10 Yuri Obshansky 2014-07-03 13:29:36 UTC
Fabian, 
Once I populated 185 VMs disk space filling up very quickly (1/2 hour).
For performance and scalability tests we don't need debug information. 
And I/O could be the bottleneck.
Regarding production environment it must be ERROR level by default of course.
I found solution for VDSM - change log level at file /etc/vdsm/logger.conf 
from DEBUG to ERROR.
Still open question regarding libvirt ???

Comment 11 Michal Skrivanek 2014-07-03 13:38:14 UTC
I do not recommend messing with vdsm's loglevel

And I'm not entirely sure what to do with libvirt's….I'd be a bit more in favor of limiting their verboseness

Comment 12 Yaniv Bronhaim 2014-07-06 13:39:21 UTC
Yes Fabien, vdsm sets libvirtd.logrotate configuration file (its under lib/vdsm/tool/libvirtd.logrotate)

Comment 13 Fabian Deutsch 2014-07-09 07:23:57 UTC
Yuri,
could you please paste the contents of /etc/logrotate.d/libvirtd ?

Comment 14 Fabian Deutsch 2014-07-09 07:24:58 UTC
Maybe a dupe of bug 1115997

Comment 15 Yuri Obshansky 2014-07-09 07:27:47 UTC
As you requested /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
}

Comment 16 Fabian Deutsch 2014-07-09 07:44:53 UTC
Hey Yuri, thanks for your quick reply. it seems to be a dupe.

*** This bug has been marked as a duplicate of bug 1115997 ***

Comment 17 Gil Klein 2014-07-28 15:50:19 UTC
@Yuri, could you please attach a sample from the log file?

We need to figure out if the logs are too verbose by default (vdsm/libvirt).

If that's the case, I suggest we re-open this BZ, and take care of the default log verbosity and not just the log rotation.

Comment 18 Yuri Obshansky 2014-07-30 10:48:05 UTC
I reopen the bug due the new information I've got.
Size of libvirt log file increased from 879 Kb up to 1.5 Gb during less 2 hours
I performed VM creations using automatic tool - JMeter
and created 130 VMs
I've got "Low disk space" error again
See below information.

879811 2014-07-30 06:51 libvirtd.log
1490116749 2014-07-30 08:41 libvirtd.log

-rw-r--r--. 1 root root  4220437 2014-07-30 06:51 supervdsm.log
-rw-r--r--. 1 vdsm kvm  16450127 2014-07-30 06:51 vdsm.log

-rw-r--r--. 1 vdsm kvm    853068 2014-07-30 07:00 vdsm.log-20140730.xz
-rw-r--r--. 1 vdsm kvm   1067696 2014-07-30 08:01 vdsm.log.1.xz
-rw-r--r--. 1 root root  4523174 2014-07-30 08:19 supervdsm.log
-rw-r--r--. 1 vdsm kvm  10819610 2014-07-30 08:41 vdsm.log

Log files have very detailed debug information which we don't need by default
(Production environment). 
Default log level configuration for both libvirt and vdsm must be "ERROR" and not "DEBUG".

Attached 2 examples of libvirt.log and vdsm.log

Comment 19 Yuri Obshansky 2014-07-30 10:49:08 UTC
Created attachment 922483 [details]
libvirt log

Comment 20 Yuri Obshansky 2014-07-30 10:50:00 UTC
Created attachment 922484 [details]
vdsm log

Comment 21 Douglas Schilling Landgraf 2014-07-30 17:25:30 UTC
(In reply to Yuri Obshansky from comment #18)
> I reopen the bug due the new information I've got.
> Size of libvirt log file increased from 879 Kb up to 1.5 Gb during less 2
> hours
> I performed VM creations using automatic tool - JMeter
> and created 130 VMs
> I've got "Low disk space" error again
> See below information.

This error should be resolved by the patch attached in the bz#1115997.
Next VDSM version should cover that.

> 
> 879811 2014-07-30 06:51 libvirtd.log
> 1490116749 2014-07-30 08:41 libvirtd.log
> 
> -rw-r--r--. 1 root root  4220437 2014-07-30 06:51 supervdsm.log
> -rw-r--r--. 1 vdsm kvm  16450127 2014-07-30 06:51 vdsm.log
> 
> -rw-r--r--. 1 vdsm kvm    853068 2014-07-30 07:00 vdsm.log-20140730.xz
> -rw-r--r--. 1 vdsm kvm   1067696 2014-07-30 08:01 vdsm.log.1.xz
> -rw-r--r--. 1 root root  4523174 2014-07-30 08:19 supervdsm.log
> -rw-r--r--. 1 vdsm kvm  10819610 2014-07-30 08:41 vdsm.log
> 
> Log files have very detailed debug information which we don't need by default
> (Production environment). 
> Default log level configuration for both libvirt and vdsm must be "ERROR"
> and not "DEBUG".
> 
> Attached 2 examples of libvirt.log and vdsm.log

These suggestion should be threat in a different bugzilla, in the VDSM component. Fell free to open, I am closing this bugzilla as the main

*** This bug has been marked as a duplicate of bug 1115997 ***