Bug 1325075 - The old logging way(file) is used when no qemu.conf file exists
Summary: The old logging way(file) is used when no qemu.conf file exists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-08 07:09 UTC by Fangge Jin
Modified: 2016-11-03 18:41 UTC (History)
6 users (show)

Fixed In Version: libvirt-1.3.4-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:41:33 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

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


Note You need to log in before you can comment on or make changes to this bug.