Red Hat Bugzilla – Bug 1151859
[RFE] Allow the libgfapi logging level to be controlled.
Last modified: 2017-08-01 13:46:48 EDT
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? No. 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? N/A. 10. List any affected packages or components. qemu-kvm qemu-kvm-rhev 11. Would the customer be able to assist in testing this functionality if implemented? Yes GSS will be able to test this.
Patches are upstream, for QEMU 2.7: https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg01310.html
Fix included in qemu-kvm-1.5.3-130.el7
Hi Jeff, Failed to boot guest with debug option details: 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 qemu-kvm-debuginfo-1.5.3-130.el7.x86_64 qemu-kvm-1.5.3-130.el7.x86_64 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
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' Thanks Suqin
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
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
(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.
update to verified according to comment9 and comment10
1. Reproduce on version: qemu-kvm-1.5.3-126.el7.x86_64 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 error: 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: qemu-kvm-1.5.3-134.el7.x86_64 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
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://access.redhat.com/errata/RHSA-2017:1856