|
From: | Eric Blake |
Subject: | Re: QMP netdev_add multiple dnssearch values |
Date: | Thu, 12 Mar 2020 16:26:37 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 11/27/19 9:49 AM, Eric Blake wrote:
On 11/27/19 7:30 AM, Markus Armbruster wrote:"Good enough" was true back then. It wasn't true when we reused it for netdev_add: hostfwd and guestfwd are list-valued. We did define a QAPI schema a few months later (14aa0c2de0 "qapi schema: add Netdev types"). net_client_init() uses it to convert from QemuOpts to QAPI type Netdev. This took us to the crazy pipeline we still use today: CLI, HMP (key=value,...) | v QMP (JSON) -> QDict -> QemuOpts -> Netdev We should instead use: CLI, HMP (key=value,...) | v QemuOpts | v QMP (JSON) -> QDict -> Netdev Back in 2016, Eric (cc'ed) posted patches to get us to this pipeline. They got stuck on backward compatibility worries: the old code accepts all parameters as JSON strings in addition to their proper type, the new code doesn't. Undocumented misfeature, but we chickened out anyway.That was before we had a deprecation process. Now we do. If we are still worried about it, then we should start the deprecation clock (squeezing it into 4.2-rc3 is risky, more likely is starting it in 5.0, so that we get rid of string support in 5.2). If we are not worried about it, then we can just kill the misfeature in 5.0.
I'm leaning towards just killing the misfeature (it's a lot of glue code to add to support the misfeature for 5.0 and 5.1, if we're just going to rip it back out for 5.2), especially since introspection is enough for any affected clients to learn about the stricter behavior.
Let's reconsider. Eric's patches break interface misuse that may or may not exist in the field. They fix a correct use of interface people want to use (or Alex wouldn't have reported this bug), and they make QMP introspection work for netdev_add. Eric, what do you think?Yes, it's time to revive that work (I have no idea if my patches from back then will still rebase nicely, though).
Now posted: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg03842.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |