RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1151859 - [RFE] Allow the libgfapi logging level to be controlled.
Summary: [RFE] Allow the libgfapi logging level to be controlled.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jeff Cody
QA Contact: Suqin Huang
URL:
Whiteboard:
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)
Environment:
Last Closed: 2017-08-01 17:46:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:1856 0 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?  

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.

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

https://lists.gnu.org/archive/html/qemu-devel/2016-04/msg01310.html

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

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

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'

Thanks
Suqin

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 ?

e.g
file.debug=-1
file.debug=12

Thanks
Suqin

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:
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

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.

https://access.redhat.com/errata/RHSA-2017:1856


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