Univention Bugzilla – Bug 34170
Increase libvirtd verbose debug output
Last modified: 2014-04-03 14:15:28 CEST
By default libvirtd in UCS logs nothing. Important messages are only logged to STDERR and collected by runsvdir: ps www `pidof runsvdir` We should enable more logging by default and optionally make it configurable through UCR to help our support team to collect useful error information. RedHat has this <https://bugzilla.redhat.com/show_bug.cgi?id=1061753> for /etc/libvirt/libvirtd.conf as recently discussed on libvirt-devel: log_filters="1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 1:util" log_outputs="1:file:/var/log/libvirt/libvirtd.log"
We can set an overall log level in libvirt.conf (4 different levels) and increase log granularity with the log_filters option to increase or lower log messages from different subsystems. Todo: test different scenarios to obtain useful default log levels. In addition, it should be checked if similar options will be made configurable for uvmm-daemon, which uses the libvirt library functions.
FYI: log_filter only works on whole C files, not on a individual function name level: > src/util/virlog.c:828 > fprio = virLogFiltersCheck(filename, &filterflags); So for libvirtd its mostly daemon/remote.c. Plus the indirectly called files src/qemu/qemu_*.c, src/xen/*.c, src/xenxs/*.c.
Three new ucr variables are introduced in this fix: libvirt/log/level, libvirt/log/filters, libvirt/log/outputs By default, only errors will be logged to /var/lib/libvirt/libvirtd.log r48929 univention-virtual-machine-manager-node 2.0.5-6.77.201404011119 r48930 2014-03-14-univention-virtual-machine-manager-node.yaml When a new uvmm-daemon connection is established to a uvmm-node-xen, the following messages are logged. They are harmless, as xen does not support snapshots, but we test it anyway (in Node.update_once()). <timestamp><pid> error : virDomainHasManagedSaveImage:16930 : this function is not supported by the connection driver: virDomainHasManagedSaveImage <timestamp><pid> error : virDomainSnapshotNum:17304 : this function is not supported by the connection driver: virDomainSnapshotNum
Updated UCR variable descriptions as suggested r48946 univention-virtual-machine-manager-node 2.0.5-7.78.201404011429 updated yaml file
FIXED: r48929+48946 spelling mistakes OK: r48930+48948 2014-03-14-univention-virtual-machine-manager-node.yaml OK: aptitude install '?source-package(univention-virtual-machine-manager-node)?installed' OK: 2.0.5-7.78.201404011429 OK: ucr set libvirt/log/level=2 OK: ucr set libvirt/log/filters='4:event 3:remote' OK: ucr set libvirt/log/outputs="1:file:/var/log/libvirt/libvirtd.log 2:file:/var/log/libvirt/libvirtd.info" OK: announce_errata -V 2014-03-14-univention-virtual-machine-manager-node.yaml
http://errata.univention.de/ucs/3.2/79.html