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 1026184 - QMP: querying -drive option returns a NULL parameter list
Summary: QMP: querying -drive option returns a NULL parameter list
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Amos Kong
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 821045 1059069
TreeView+ depends on / blocked
 
Reported: 2013-11-04 06:45 UTC by Amos Kong
Modified: 2015-05-25 00:07 UTC (History)
15 users (show)

Fixed In Version: qemu-kvm-1.5.3-51.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:14:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Amos Kong 2013-11-04 06:45:59 UTC
Description of problem:

{ 'execute': 'query-command-line-options', 'arguments': { 'option': 'drive' } }

{
    "return": [
       	{
            "parameters": [
            ],
            "option": "drive"
        }
    ]
}


Currently we have three QemuOptsList (qemu_common_drive_opts,
qemu_legacy_drive_opts, and qemu_drive_opts)

only qemu_drive_opts is added to vm_config_groups[]

We query commandline options by checking information in vm_config_groups[],
so we can only get a NULL parameter list now.

Another issue is we also can't query legacy options of -drive.


Version-Release number of selected component (if applicable):
qemu-kvm-1.5.3-9.el7


Steps to Reproduce:
1. execute qmp command to query -drive option

{ 'execute': 'query-command-line-options', 'arguments': { 'option': 'drive' } }

Actual results:
returns a NULL parameter

Expected results:
all parameter items will be returned.

Comment 2 Eric Blake 2013-11-13 15:18:50 UTC
Libvirt is relying on the query-command-line-options for deciding whether to support drive discard options.

Comment 3 Osier Yang 2013-12-06 06:42:56 UTC
Is the patch in qemu.git master now? except the drive discard, there are other 3 capability flags depended on query-command-line-options. So we would like see the patch could be backported as soon as possible.

Comment 11 Miroslav Rezanina 2014-03-05 10:32:31 UTC
Fix included in qemu-kvm-1.5.3-51.el7

Comment 13 langfang 2014-03-10 02:41:38 UTC
Reproduce this bug as follow version:
Host:
# uname -r
3.10.0-99.el7.x86_64
# rpm -q qemu-kvm-rhev
qemu-kvm-rhev-1.5.3-50.el7.x86_64
# rpm -q seabios
seabios-1.7.2.2-11.el7.x86_64

Guest:
3.10.0-99.el7.x86_64

Steps:
1.Boot guest with 
 /usr/libexec/qemu-kvm -M pc-i440fx-rhel7.0.0 -cpu SandyBridge -enable-k048 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name RHEL7.0 -uuid `uuidgen` -rtc base=localtime,clock=host,driftfix=slew -device ahci,id=ahci0 -drive if=none,file=/home/rhel7base.qcow2_v3,format=qcow2,id=drive-sata0-0-0 -device ide-drive,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0  -netdev tap,id=hostdev0,vhost=on,script=/etc/qemu-ifup,queues=4 -device virtio-net-pci,netdev=hostdev0,vectors=10,mq=on,mac=14:32:19:82:9b:12,id=vnet0 -device virtio-balloon-pci,bus=pci.0,id=balloon0 -monitor stdio  -vnc :10 -vga qxl -qmp tcp:0:5555,server,nowait


2.# telnet 10.66.5.251 5555
Trying 10.66.5.251...
Connected to 10.66.5.251.
Escape character is '^]'.
{"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-50.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{ 'execute': 'query-command-line-options', 'arguments': { 'option': 'drive' } }

Results:returns a NULL parameter
{"return": [{"parameters": [], "option": "drive"}]}

Verify this bug as follow version:
Host:

Version:
Host:
# uname -r 
3.10.0-99.el7.x86_64
[root@localhost qemu52]# rpm -q qemu-kvm
qemu-kvm-1.5.3-52.el7.x86_64

Guest:
3.10.0-99.el7.x86_64

Steps as same as reproduce 

Results:
{"return": [{"parameters": [{"name": "copy-on-read", "help": "copy read data from backing file into image file", "type": "boolean"}, {"name": "read-only", "help": "open drive file as read-only", "type": "boolean"}, {"name": "addr", "help": "pci address (virtio only)", "type": "string"}, {"name": "boot", "help": "(deprecated, ignored)", "type": "boolean"}, {"name": "trans", "help": "chs translation (auto, lba, none)", "type": "string"}, {"name": "secs", "help": "number of sectors (ide disk geometry)", "type": "number"}, {"name": "heads", "help": "number of heads (ide disk geometry)", "type": "number"}, {"name": "cyls", "help": "number of cylinders (ide disk geometry)", "type": "number"}, {"name": "if", "help": "interface (ide, scsi, sd, mtd, floppy, pflash, virtio)", "type": "string"}, {"name": "media", "help": "media type (disk, cdrom)", "type": "string"}, {"name": "index", "help": "index number", "type": "number"}, {"name": "unit", "help": "unit number (i.e. lun for scsi)", "type": "number"}, {"name": "bus", "help": "bus number", "type": "number"}, {"name": "throttling.bps-write", "help": "limit write bytes per second", "type": "number"}, {"name": "throttling.bps-read", "help": "limit read bytes per second", "type": "number"}, {"name": "throttling.bps-total", "help": "limit total bytes per second", "type": "number"}, {"name": "throttling.iops-write", "help": "limit write operations per second", "type": "number"}, {"name": "throttling.iops-read", "help": "limit read operations per second", "type": "number"}, {"name": "throttling.iops-total", "help": "limit total I/O operations per second", "type": "number"}, {"name": "werror", "help": "write error action", "type": "string"}, {"name": "rerror", "help": "read error action", "type": "string"}, {"name": "serial", "help": "disk serial number", "type": "string"}, {"name": "format", "help": "disk format (raw, qcow2, ...)", "type": "string"}, {"name": "aio", "help": "host AIO implementation (threads, native)", "type": "string"}, {"name": "cache.no-flush", "help": "ignore any flush requests for the device", "type": "boolean"}, {"name": "cache.direct", "help": "enables use of O_DIRECT (bypass the host page cache)", "type": "boolean"}, {"name": "cache.writeback", "help": "enables writeback mode for any caches", "type": "boolean"}, {"name": "discard", "help": "discard operation (ignore/off, unmap/on)", "type": "string"}, {"name": "file", "help": "disk image", "type": "string"}, {"name": "snapshot", "help": "enable/disable snapshot mode", "type": "boolean"}], "option": "drive"}]}


According to above test ,this bug fixed.

Comment 15 Ludek Smid 2014-06-13 12:14:03 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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