From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Michael Roth <michael.roth@amd.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH 1/3] qapi, audio: add query-audiodev command
Date: Thu, 11 Mar 2021 11:00:20 +0000 [thread overview]
Message-ID: <YEn4RGhbBp0zbSJq@redhat.com> (raw)
In-Reply-To: <87a6rh3gbp.fsf@dusky.pond.sub.org>
On Fri, Mar 05, 2021 at 02:01:14PM +0100, Markus Armbruster wrote:
> Daniel P. Berrangé <berrange@redhat.com> writes:
>
> > Way back in QEMU 4.0, the -audiodev command line option was introduced
> > for configuring audio backends. This CLI option does not use QemuOpts
> > so it is not visible for introspection in 'query-command-line-options',
> > instead using the QAPI Audiodev type. Unfortunately there is also no
> > QMP command that uses the Audiodev type, so it is not introspectable
> > with 'query-qmp-schema' either.
>
> This is a gap that will only widen.
>
> By design, query-qmp-schema covers just QMP. It doesn't cover the
> QAPIfied parts of the CLI. They have been growing slowly, and this
> trend will continue. We need schema introspection to cover the CLI,
> too. Observation, not demand.
>
> Work-arounds:
>
> 1. When a QMP command equivalent to a QAPIfied CLI option exists,
> introspect that. Involves hardcoding the connection between the two.
> Example: -blockdev and blockdev-add.
I'd say this is the scenario that wil lapply long term. As we aim
for a world where you can run "qemu -qmp unix:/tmp/sock,server"
and then configure everything over QMP, we should cease to have
any scenarios where stuff is missing from query-qmp-schemas,
as we'll have a QMP command that covers everything.
IOW, in this case we really ought to have a 'audiodev-add'
command as a counterpart to -audiodev CLI. Not sure if there
are any dragons wrt to creating audio backends on the fly.
> 2. When a QMP query exists that returns the CLI option argument,
> introspect that. Involves hardcoding the connection between the two.
> Example: -display and query-display-options.
>
> 3. When neither exists, create a suitable query just to enable
> introspection. Example: query-display-options. Commit e1ca8f7e19
> "qapi: add query-display-options command" explains this clearly:
>
> Add query-display-options command, which allows querying the qemu
> display configuration. This isn't particularly useful, except it
> exposes QAPI type DisplayOptions in query-qmp-schema, so that libvirt
> can discover recently added -display parameter rendernode (commit
> d4dc4ab133b). Works around lack of sufficiently powerful command line
> introspection.
I figure having a 'query-foo' QMP corresponding to any 'foo-add' QMP
is useful as a general rule to allow mgmt (or human support engineers)
to inspect an running instance and understand its configuration,
especially since it won't be visible in CLI args if we move to 100%
QMP based config.
> > This introduces a 'query-audiodev' command that simply reflects back
> > the list of configured -audiodev command line options. This in turn
> > makes Audiodev introspectable via 'query-qmp-schema'.
>
> Is the query just for enabling introspection, or does it have other
> uses?
On the libvirt side we only need it for enabling introspection.
As a general rule, being able to inspect any aspect of configuration
via QMP is useful for support purposes if nothing else.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2021-03-11 11:02 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 17:55 [PATCH 0/3] audio: make audiodev introspectable by mgmt apps Daniel P. Berrangé
2021-03-02 17:55 ` [PATCH 1/3] qapi, audio: add query-audiodev command Daniel P. Berrangé
2021-03-02 19:03 ` Eric Blake
2021-03-02 21:10 ` Philippe Mathieu-Daudé
2021-03-02 21:12 ` Philippe Mathieu-Daudé
2021-03-03 10:07 ` Daniel P. Berrangé
2021-03-03 10:08 ` Daniel P. Berrangé
2021-03-05 13:01 ` Markus Armbruster
2021-03-11 11:00 ` Daniel P. Berrangé [this message]
2021-03-02 17:55 ` [PATCH 2/3] qapi, audio: respect build time conditions in audio schema Daniel P. Berrangé
2021-03-02 19:05 ` Eric Blake
2021-03-03 10:09 ` Daniel P. Berrangé
2021-03-03 7:00 ` Gerd Hoffmann
2021-03-03 10:11 ` Daniel P. Berrangé
2021-03-05 10:56 ` Markus Armbruster
2021-03-11 11:04 ` Daniel P. Berrangé
2021-03-05 12:12 ` Markus Armbruster
2022-12-12 16:53 ` Thomas Huth
2022-12-14 11:28 ` Daniel P. Berrangé
2021-03-02 17:55 ` [PATCH 3/3] qapi: provide a friendly string representation of QAPI classes Daniel P. Berrangé
2021-03-02 19:06 ` Eric Blake
2021-03-02 21:02 ` Philippe Mathieu-Daudé
2021-03-05 13:18 ` Markus Armbruster
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=YEn4RGhbBp0zbSJq@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=kraxel@redhat.com \
--cc=michael.roth@amd.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).