[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Notes on Generating Python signatures for QMP RPCs
From: |
John Snow |
Subject: |
Re: Notes on Generating Python signatures for QMP RPCs |
Date: |
Thu, 3 Feb 2022 16:14:28 -0500 |
On Thu, Feb 3, 2022 at 5:04 AM Markus Armbruster <armbru@redhat.com> wrote:
> John Snow <jsnow@redhat.com> writes:
> > On Thu, Jan 27, 2022 at 9:03 AM Markus Armbruster <armbru@redhat.com> wrote:
> >> John Snow <jsnow@redhat.com> writes:
> >> > (7) I have no idea what to do about functions that "may not return".
> >> > The QGA stuff in particular, I believe, is prone to some weirdness
> >> > that violates the core principles of the QMP spec.
> >>
> >> Yes.
> >>
> >> docs/interop/qmp-spec.txt dictates a command sends either a success or
> >> an error response. Makes sense.
> >>
> >> QGA has a few commands that shut down the guest. How could such a
> >> command send a success response? If it sends it before it initiates
> >> shutdown, response transmission races with shutdown. The easy way out
> >> is violating qmp-spec.txt. Thus, 'success-response': false. Just for
> >> QGA.
> >>
> >
> > Oh, whoops, I already have the information we need. O:-)
> > (Assuming that 'success-response' is visible in the introspection data,
> > anyway.
>
> qapi/introspect.json:
>
> ##
> # @SchemaInfoCommand:
> [...]
> # TODO: @success-response (currently irrelevant, because it's QGA, not
> QMP)
> #
> # Since: 2.5
> ##
> { 'struct': 'SchemaInfoCommand',
> 'data': { 'arg-type': 'str', 'ret-type': 'str',
> '*allow-oob': 'bool' } }
>
> The TODO neglects to spell out "and QGA doesn't support introspection so
> far".
>
Oof, ouch, my bones.
What will it take to add introspection to QGA? (Is this GSoC/Outreachy
appropriate?)
(This is not critically important to me, just a backburner thought.)
--js