Bug 1325075

Summary: The old logging way(file) is used when no qemu.conf file exists
Product: Red Hat Enterprise Linux 7 Reporter: Fangge Jin <fjin>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: dyuan, mzhan, pkrempa, rbalakri, yafu, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-1.3.4-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 18:41:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fangge Jin 2016-04-08 07:09:09 UTC
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:

Comment 2 Peter Krempa 2016-04-28 07:35:15 UTC
commit 63e2b766a5a704eb19b8bdaeb1cf0fa91f990cb8
Author: Peter Krempa <pkrempa>
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.

Comment 4 yafu 2016-05-06 06:15:15 UTC
Test pass with build libvirt-1.3.4-1.el7.x86_64.

Steps are as comment 0

Comment 6 errata-xmlrpc 2016-11-03 18:41:33 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.

https://rhn.redhat.com/errata/RHSA-2016-2577.html