Red Hat Bugzilla – Bug 1325075
The old logging way(file) is used when no qemu.conf file exists
Last modified: 2016-11-03 14:41:33 EDT
Description of problem: The old logging way(file) is used when no qemu.conf file exists. Version-Release number of selected component: libvirt-1.3.3-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 0. Log in as non-root user: $ id uid=1001(fjin) gid=1001(fjin) groups=1001(fjin) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 1. $ virsh start rhel7.2 Domain rhel7.2 started 2. $ lsof /home/fjin/.cache/libvirt/qemu/log/rhel7.2-agent.log COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME qemu-kvm 30098 fjin 1w REG 253,2 2634 537370310 /home/fjin/.cache/libvirt/qemu/log/rhel7.2-agent.log qemu-kvm 30098 fjin 2w REG 253,2 2634 537370310 /home/fjin/.cache/libvirt/qemu/log/rhel7.2-agent.log 3. Touch qemu.conf file: $ touch /home/fjin/.config/libvirt/qemu.conf 4. Wait 30s for virtlogd exits or restart virtlogd process. Then $ virsh destroy rhel7.2 $ virsh start rhel7.2 5.$ lsof /home/fjin/.cache/libvirt/qemu/log/rhel7.2.log COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME virtlogd 30995 fjin 14w REG 253,2 5354 537370308 /home/fjin/.cache/libvirt/qemu/log/rhel7.2.log Actual results: When no qemu.conf file exists, the old logging way(file) is used. Expected results: Virtlogd is used by default no matter whether qemu.conf file exists. Additional info:
commit 63e2b766a5a704eb19b8bdaeb1cf0fa91f990cb8 Author: Peter Krempa <pkrempa@redhat.com> Date: Wed Apr 27 12:58:13 2016 +0200 qemu: conf: Set default logging approach in virQEMUDriverConfigNew Instead of setting the default qemu stdio logging approach in virQEMUDriverConfigLoadFile set it in virQEMUDriverConfigNew so that it's properly set even when the config is not present.
Test pass with build libvirt-1.3.4-1.el7.x86_64. Steps are as comment 0
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. https://rhn.redhat.com/errata/RHSA-2016-2577.html