Bug 1281407 - Memdev id is not specified when query memdev via QMP
Memdev id is not specified when query memdev via QMP
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Igor Mammedov
Yumei Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-12 07:57 EST by Yumei Huang
Modified: 2017-08-01 23:24 EDT (History)
8 users (show)

See Also:
Fixed In Version: qemu-kvm-rhev-2.9.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 19:29:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yumei Huang 2015-11-12 07:57:43 EST
Description of problem:
When query-memdev via QMP, the returned string doesn't specify the memdev id.

Version-Release number of selected component (if applicable):
kernel: 3.10.0-329.el7.x86_64
qemu-kvm: qemu-kvm-rhev-2.3.0-31.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Launch a guest:
/usr/libexec/qemu-kvm -m 4G,slots=4,maxmem=16G -smp 4 \
-monitor stdio -qmp tcp:0:4444,server,nowait \
-object memory-backend-ram,id=mem0,size=1G -device pc-dimm,id=dimm0,memdev=mem0  \
 -object memory-backend-ram,id=mem1,size=1G -device pc-dimm,id=dimm1,memdev=mem1  

2. Query memdev via QMP:
{'execute': 'qmp_capabilities'}
{"return": {}}

{ "execute": "query-memdev" }
{"return": [{"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}, {"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}]}



Actual results:
{"return": [{"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}, {"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default"}]}

Expected results:
The returned string should specify the memdev id.

Additional info:
Comment 2 Igor Mammedov 2016-09-20 08:10:37 EDT
not 7.3 material by now, moving to 7.4 as feature improvement
Comment 3 Igor Mammedov 2017-01-03 08:05:02 EST
posted fix upstream:
 https://www.mail-archive.com/qemu-devel@nongnu.org/msg419924.html
Comment 4 Igor Mammedov 2017-01-16 05:06:12 EST
Upstream commits:

e1ff3c6 monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends
3a46410 monitor: reuse user_creatable_add_opts() instead of user_creatable_add()
8a00025 qom: remove unused header
Comment 5 Yumei Huang 2017-04-24 04:56:40 EDT
Verify:
qemu-kvm-rhev-2.9.0-1.el7
kernel-3.10.0-655.el7.x86_64

1. Boot guest with two pc-dimm

# /usr/libexec/qemu-kvm -m 4G,slots=40,maxmem=40G \

-drive file=rhel74.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none  -device virtio-blk-pci,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \

 -netdev tap,id=idinWyYp -device virtio-net-pci,mac=42:ce:a9:d2:4d:d7,id=idlbq7eA,netdev=idinWyYp \

-vnc :0 -monitor stdio \

-object memory-backend-ram,id=mem0,size=1G -device pc-dimm,id=dimm0,memdev=mem0\

-object memory-backend-ram,id=mem1,size=1G -device pc-dimm,id=dimm1,memdev=mem1\

-qmp tcp:0:4444,server,nowait

2. Hotplug memory to guest
(qemu) object_add memory-backend-ram,id=mem3,host-nodes=1,size=1G,policy=bind
(qemu) device_add pc-dimm,id=dimm3,memdev=mem3

3. Check memdev via qmp
{'execute': 'qmp_capabilities'}
{"return": {}}

{ "execute": "query-memdev" }
{"return": [{"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default", "id": "mem1"}, {"prealloc": false, "host-nodes": [], "size": 1073741824, "merge": true, "dump": true, "policy": "default", "id": "mem0"}, {"prealloc": false, "host-nodes": [1], "size": 1073741824, "merge": true, "dump": true, "policy": "bind", "id": "mem3"}]}

The memdev id is explicit and correct in qmp. So the bug is fixed.
Comment 7 errata-xmlrpc 2017-08-01 19:29:42 EDT
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:2392
Comment 8 errata-xmlrpc 2017-08-01 21:07:21 EDT
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:2392
Comment 9 errata-xmlrpc 2017-08-01 21:59:20 EDT
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:2392
Comment 10 errata-xmlrpc 2017-08-01 22:40:06 EDT
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:2392
Comment 11 errata-xmlrpc 2017-08-01 23:04:50 EDT
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:2392
Comment 12 errata-xmlrpc 2017-08-01 23:24:58 EDT
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:2392

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