Bug 1151859 - [RFE] Allow the libgfapi logging level to be controlled.
Summary: [RFE] Allow the libgfapi logging level to be controlled.
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Suqin Huang
Depends On: 1320714
Blocks: 1376009
TreeView+ depends on / blocked
Reported: 2014-10-12 17:01 UTC by Lee Yarwood
Modified: 2017-08-01 17:46 UTC (History)
20 users (show)

Fixed In Version: qemu-kvm-1.5.3-130.el7
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1320714 (view as bug list)
Last Closed: 2017-08-01 17:46:48 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1856 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2017-08-01 18:03:36 UTC

Description Lee Yarwood 2014-10-12 17:01:17 UTC
1. Proposed title of this feature request  
[RFE] Allow the libgfapi logging level to be controlled.
2. Who is the customer behind the request?  
N/A - GSS are requesting this feature.
3. What is the nature and description of the request?  
The logging level of libgfapi is currently hard coded within QEMU as LOG_WARNING. It would be useful to allow control of this via a command line argument to ease debugging of any Gluster related issues.

4. Why does the customer need this? (List the business requirements here) 

Ease debugging, remove the need to recompile QEMU to increase the logging level etc. 
5. How would the customer like to achieve this? (List the functional requirements here)  

A simple QEMU argument able to control the logging level.

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  

Ensure that the level provided is reflected in the logs.

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?  


8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  
Both RHEL 6 and RHEL 7.

9. Is the sales team involved in this request and do they have any additional input?  


10. List any affected packages or components.  


11. Would the customer be able to assist in testing this functionality if implemented?  

Yes GSS will be able to test this.

Comment 1 Jeff Cody 2016-04-28 19:07:20 UTC
Patches are upstream, for QEMU 2.7:


Comment 4 Miroslav Rezanina 2017-02-01 11:57:23 UTC
Fix included in qemu-kvm-1.5.3-130.el7

Comment 6 Suqin Huang 2017-02-23 09:27:13 UTC
Hi Jeff,

Failed to boot guest with debug option


 could not open disk image gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com:0/distdata01/shuang.raw: Block format 'raw' used by device 'drive_image2' doesn't support the option 'debug'

# rpm -qa | grep qemu-kvm

1. create image with 
 qemu-img create gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com:0/distdata01/shuang.raw 1G

2. boot guest with
/usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pc  \
    -nodefaults  \
    -vga std  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-qmpmonitor1-20160129-133009-OkYQqhNt,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/tmp/monitor-catch_monitor-20160129-133009-OkYQqhNt,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control \
    -device pvpanic,ioport=0x505,id=id4FDckd  \
    -chardev socket,id=serial_id_serial0,path=/tmp/serial-serial0-20160129-133009-OkYQqhNt,server,nowait \
    -device isa-serial,chardev=serial_id_serial0  \
    -chardev socket,id=seabioslog_id_20160129-133009-OkYQqhNt,path=/tmp/seabios-20160129-133009-OkYQqhNt,server,nowait \
    -device isa-debugcon,chardev=seabioslog_id_20160129-133009-OkYQqhNt,iobase=0x402 \
    -device ich9-usb-ehci1,id=usb1,addr=1d.7,multifunction=on,bus=pci.0 \
    -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=1d.0,firstport=0,bus=pci.0 \
    -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=1d.2,firstport=2,bus=pci.0 \
    -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=1d.4,firstport=4,bus=pci.0 \
    -drive id=drive_image1,if=none,cache=none,snapshot=off,aio=native,file=/usr/share/avocado/data/avocado-vt/images/rhel73-64-virtio.qcow2 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=03 \
    -drive id=drive_image2,if=none,cache=none,file=gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com:0/distdata01/shuang.raw,debug=0  \
    -device virtio-blk-pci,id=image2,drive=drive_image2,bus=pci.0,addr=08 \
    -device virtio-net-pci,mac=9a:0d:0e:0f:10:11,id=idKK4Mdq,vectors=4,netdev=idgjGCvt,bus=pci.0,addr=05  \
    -netdev tap,id=idgjGCvt,vhost=on,script=/etc/qemu-ifup \
    -m 2048 \
    -smp 1,maxcpus=1,cores=1,threads=1,sockets=1  \
    -cpu 'Opteron_G4',hv_relaxed,+kvm_pv_unhalt,hv_spinlocks=0x1fff,hv_vapic,hv_time \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=localtime,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -monitor stdio

Comment 7 Suqin Huang 2017-02-28 06:36:55 UTC
Hi Prasanna,

Could you have a look the comment6

when I boot with debug option, error occor

 could not open disk image gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com:0/distdata01/shuang.raw: Block format 'raw' used by device 'drive_image2' doesn't support the option 'debug'


Comment 8 Jeff Cody 2017-02-28 12:49:21 UTC
Hi Suqin,

You need to use file.debug= rather than just debug= (so that you are talking to the underlying file protocol rather than the image format driver).

So for your example, that would be:

-drive id=drive_image2,if=none,cache=none,file=gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com:0/distdata01/shuang.raw,file.debug=0

Comment 9 Suqin Huang 2017-03-03 08:42:17 UTC
Hi Jeff,

I saw this cmd in the patch " +#define GLUSTER_DEBUG_MAX 9"

but I can boot guest with any num, is it acceptable ?



Comment 10 Jeff Cody 2017-03-15 14:09:42 UTC
(In reply to Suqin Huang from comment #9)
> Hi Jeff,
> I saw this cmd in the patch " +#define GLUSTER_DEBUG_MAX 9"
> but I can boot guest with any num, is it acceptable ?
> e.g
> file.debug=-1
> file.debug=12
> Thanks
> Suqin

Hi Suqin,

Yes, that is the intended behavior.  That max is just internal code, that will cap any number passed to that maximum.  So if you pass 12, that will be capped internally to 9 when passing it to gluster.

Comment 11 Suqin Huang 2017-03-20 06:57:35 UTC
update to verified according to comment9 and comment10

Comment 12 Suqin Huang 2017-03-23 06:46:01 UTC
1. Reproduce on version:

boot guest with
-drive id=drive_image2,if=none,cache=none,format=qcow2,file=gluster://bootp-73-130-253.rhts.eng.pek2.redhat.com/gv0/stg1.qcow2,file.debug=1

qemu-kvm: -drive id=drive_image2,if=none,cache=none,format=qcow2,file=gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com/distdata01/stg.qcow2,file.debug=0: could not open disk image gluster://gluster-virt-qe-01.lab.eng.pek2.redhat.com/distdata01/stg.qcow2: Block protocol 'gluster' doesn't support the option 'debug'

2. Verified on version:

boot up guest successfully with debug level (0~9) and debug=12, debug=-1

-drive id=drive_image2,if=none,cache=none,format=qcow2,file=gluster://bootp-73-130-253.rhts.eng.pek2.redhat.com/gv0/stg1.qcow2,file.debug=1

Comment 13 errata-xmlrpc 2017-08-01 17:46:48 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.


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