Description of problem: QEMU 6.0, does not support using 'props' to add multiple properties for qmp command 'object-add' Version-Release number of selected component (if applicable): qemu-kvm-6.0.0-14rc0.scrmod+el8.5.0+10480+a8e067ae.wrb210325 https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1550013 How reproducible: 100% Steps to Reproduce: 1. Create a luks image by command: # /usr/bin/qemu-img create --object secret,id=stg0_encrypt0,data=redhat -f luks -o key-secret=stg0_encrypt0 /home/kvm_autotest_root/images/storage0.luks 30G 2. Boot VM with a qmp monitor -chardev socket,id=qmp_id_qmpmonitor1,nowait,server,path=/tmp/avocado_fscgpw90/monitor-qmpmonitor1-20210331-023641-unuXWLx8 \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ 3. Start to hotplug devices "stg0" by monitor qmpmonitor1 2021-03-31 02:37:50: {"execute": "object-add", "arguments": {"qom-type": "secret", "id": "stg0_encrypt0", "props": {"data": "redhat"}}, "id": "zjucmzTH"} 2021-03-31 02:37:50: {"id": "zjucmzTH", "error": {"class": "GenericError", "desc": "Parameter 'props' is unexpected"}} Actual results: hotplug failed as "Parameter 'props' is unexpected" Expected results: For the old version, props is a dict to handle multiple properties, it work well. Additional info: memory hotplug which use 'object-add' command failed as: 12:03:56: {"execute": "object-add", "arguments": {"qom-type": "memory-backend-ram", "id": "mem-plug1", "props": {"size": 1073741824, "policy": "default"}}, "id": "PpDR2Rg7"} 12:03:56: {"id": "PpDR2Rg7", "error": {"class": "GenericError", "desc": "Parameter 'size' is missing"}} I think the root cause is same, 'props' was handled incorrectly cause it can't get the 'size'. As the change from memory side, 'size' is must, so it raise the exception 'size is missing' before 'Parameter 'props' is unexpected'.
After review the code change, i got: commit 50243407457a9fb0ed17b9a9ba9fc9aee09495b1 Author: Kevin Wolf <kwolf> Date: Fri Nov 27 18:11:02 2020 +0100 qapi/qom: Drop deprecated 'props' from object-add The option has been deprecated in QEMU 5.0, remove it. Signed-off-by: Kevin Wolf <kwolf> Acked-by: Paolo Bonzini <pbonzini> Acked-by: Peter Krempa <pkrempa> Reviewed-by: Eric Blake <eblake> So, this is the expected result ? Hi Kevin, Could you help check this, without the props, we need add all the properties one by one, is it ?
Move to RHEL-AV
(In reply to Yanan Fu from comment #1) > So, this is the expected result ? Yes, this is expected. It seems that you were manually sending QMP commands, so it's not a layered product that missed the change and is affected, right? I'm closing as NOTABUG now, but if a layered product can't handle the change, we would need to reopen and move it there. > Hi Kevin, > Could you help check this, without the props, we need add all the properties > one by one, is it ? You just need to specify all properties on the top level now, like this: {"execute": "object-add", "arguments": {"qom-type": "memory-backend-ram", "id": "mem-plug1", "size": 1073741824, "policy": "default"}, "id": "PpDR2Rg7"}
(In reply to Kevin Wolf from comment #3) > (In reply to Yanan Fu from comment #1) > > So, this is the expected result ? > > Yes, this is expected. It seems that you were manually sending QMP commands, > so it's not a layered product that missed the change and is affected, right? > I'm closing as NOTABUG now, but if a layered product can't handle the > change, we would need to reopen and move it there. > Yes, i tested with qemu-kvm directly, will update our auto script accordingly. Just tried with libvirt-7.0.0, it still use 'props' now: {"execute":"object-add","arguments":{"qom-type":"memory-backend-ram","id":"memdimm0","props":{"size":524288000}},"id":"libvirt-380"} This is a upstream QEMU testing, will pay attention to this issue when it be consumed by downstream libvirt, thanks! > > Hi Kevin, > > Could you help check this, without the props, we need add all the properties > > one by one, is it ? > > You just need to specify all properties on the top level now, like this: > > {"execute": "object-add", "arguments": {"qom-type": "memory-backend-ram", > "id": "mem-plug1", "size": 1073741824, "policy": "default"}, "id": > "PpDR2Rg7"}