From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org,
marcandre.lureau@redhat.com
Subject: Re: [PATCH 0/6] qemu-storage-daemon: QAPIfy --chardev
Date: Sun, 25 Oct 2020 18:42:42 +0100 [thread overview]
Message-ID: <878sbutd65.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <ae2ffc01-84e3-70bc-c764-b9a69eba6b92@redhat.com> (Paolo Bonzini's message of "Fri, 23 Oct 2020 18:08:19 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 23/10/20 15:40, Markus Armbruster wrote:
>>>
>>> The benefit of the user creatable object approach is that we dont
>>> have to add custom CLI args for different types of object, nor write
>>> code to populate QOM from QAPI. The downside is that we're divorced
>>> from the QAPI schema, so loose introspection, and have a different
>>> type of tedious boilerplate code to write.
>>
>> Loss of QAPI introspection is the killer.
>>
>> We have QOM introspection, but it's far too weak to serve as
>> replacement. Besides, two introspection facilities is one too many.
>
> Wouldn't Eduardo+Kevin's work on object-add provide that too?
Yes, the issue "replacing chardev-add by object-add loses QAPI
introspection" evaporates when object-add becomes QAPI-introspectable.
>> Nevertheless, we need Kevin's work now to get a decent storage daemon
>> CLI while that's still easy to do. We'll have to promise stability
>> soon, and then changes get much harder.
>
> I think we haven't answered the question of whether qsd needs a CLI at all.
>
> I looked recently at qemu_init and it struck me that, in principle, the
> only _really_ necessary command line options for QEMU are -sandbox,
> -name and possibly -trace (only to be able to trace the monitor). For
> everything else, one could use LISTEN_FDS socket activation mechanism,
> or if there's no LISTEN_FDS environment variable open a QMP socket on
> stdin/stdout.
Nobody argues this can't be done. Some of us argue it should not be
done :)
> For qemu-standard-daemon, that would be _really_ true and not just in
> principle I understand that having a command-line can be useful to
> developers as it's less unwieldy than JSON, but why does it have to be
> stable?
Let me split this into multiple questions:
1. Does qsd need a CLI beyond whatever is needed to provide QMP?
2. If yes, does it need to be stable?
3. Does it need to be machine-friendly?
4. Does it need to be human-friendly?
5. What does it mean to be human-friendly?
I'd expect Kevin to answer question 1. and 4. with an emphatic yes. I
concur, because without a usable CLI, ad hoc usability is awful. My
idea of "usable" is probably less demanding than Kevin's, but that's
question 5 already.
The step from a QMP command that returns nothing to machine-friendly CLI
option is almost trivial: -blockdev with a JSON argument proves it.
This makes me answer 3. with "why not?", and 2. with "this
machine-friendly interface is stable by construction".
We already paid for the step from machine-friendly CLI to a slightly
more human-friendly CLI: -blockdev with a dotted keys argument proves
it. This makes me answer 4. with "why not / why override the qsd
maintainer?"
Question 5. is open-ended. I think a truly human-friendly CLI will take
extra work, similar to how HMP does. I believe it can be done with less
overhead than HMP has today. I don't plan to sink a lot of time into it
myself, at least not in the immediate future.
> Could we default to only 2-3 command-line options in the same
> fashion, and only accept --blockdev and friends if the user starts the
> command line with "qemu-storage-daemon --i-am-not-a-script"?
Making people type --i-am-not-a-script is begging for getting pelted
with vegetables at the next non-virtual KVM Forum.
I think what you're trying to accomplish is to tell a program off when
it uses a part of the CLI programs should not use. My "Configurable
policy for handling deprecated interfaces" series can grow to do exactly
that, but it's opt-in (because I don't fancy getting pelted with
vegetables).
prev parent reply other threads:[~2020-10-25 17:44 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 10:12 [PATCH 0/6] qemu-storage-daemon: QAPIfy --chardev Kevin Wolf
2020-10-23 10:12 ` [PATCH 1/6] char/stdio: Fix QMP default for 'signal' Kevin Wolf
2020-10-23 10:38 ` Marc-André Lureau
2020-10-23 12:12 ` Markus Armbruster
2020-10-23 10:12 ` [PATCH 2/6] char: Factor out qemu_chr_print_types() Kevin Wolf
2020-10-23 10:38 ` Marc-André Lureau
2020-10-23 12:15 ` Markus Armbruster
2020-10-23 10:12 ` [PATCH 3/6] qapi: Remove wrapper struct for simple unions Kevin Wolf
2020-10-23 10:40 ` Marc-André Lureau
2020-10-23 11:06 ` Marc-André Lureau
2020-10-23 12:28 ` Kevin Wolf
2020-10-23 12:49 ` Markus Armbruster
2020-10-23 14:06 ` Kevin Wolf
2020-10-23 10:12 ` [PATCH 4/6] qapi: Optionally parse simple unions as flat Kevin Wolf
2020-10-23 10:12 ` [PATCH 5/6] tests/qapi-schema: Flat representation of simple unions Kevin Wolf
2020-10-23 10:12 ` [PATCH 6/6] qemu-storage-daemon: Use qmp_chardev_add() for --chardev Kevin Wolf
2020-10-26 13:33 ` Markus Armbruster
2020-10-23 10:36 ` [PATCH 0/6] qemu-storage-daemon: QAPIfy --chardev Daniel P. Berrangé
2020-10-23 11:05 ` Paolo Bonzini
2020-10-23 11:56 ` Kevin Wolf
2020-10-23 13:40 ` Markus Armbruster
2020-10-23 16:08 ` Paolo Bonzini
2020-10-25 17:42 ` 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=878sbutd65.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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.