All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Alex Kirillov <lekiravi@yandex-team.ru>,
	"jasowang@redhat.com" <jasowang@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"yc-core@yandex-team.ru" <yc-core@yandex-team.ru>
Subject: Re: QMP netdev_add multiple dnssearch values
Date: Fri, 13 Mar 2020 16:09:53 +0100	[thread overview]
Message-ID: <875zf8i94u.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1819f914-1b88-d227-6a7b-b79ecb74679f@redhat.com> (Eric Blake's message of "Thu, 12 Mar 2020 16:26:37 -0500")

Eric Blake <eblake@redhat.com> writes:

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

Here's my practical argument for simply killing it without further
delay.

We have a bug we know to affect users: the one reported by Alex.

We have a misfeature users may or may not rely on: the one that made us
chicken out.

To fix the bug, we have to kill the misfeature.  Fixing it without
killing the misfeature feels impractical.  For 5.0, it's flat-out
impossible.

Deprecating the misfeature for a grace period before we kill it means
letting the bug continue to bite users for the whole grace period.

Since we lack the means to communicate "you're using a deprecate
misfeature, stop it!" to QMP clients, the deprecation grace period is
unlikely to help much.

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

Thanks, I'll review.

      reply	other threads:[~2020-03-13 15:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 13:53 QMP netdev_add multiple dnssearch values Alex Kirillov
2019-10-25  5:20 ` Markus Armbruster
2019-10-29 10:20   ` Alex Kirillov
2019-11-27 13:30     ` Markus Armbruster
2019-11-27 15:49       ` Eric Blake
2020-03-12 21:26         ` Eric Blake
2020-03-13 15:09           ` Markus Armbruster [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zf8i94u.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=lekiravi@yandex-team.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=yc-core@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.