qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notes on Generating Python signatures for QMP RPCs


From: Markus Armbruster
Subject: Re: Notes on Generating Python signatures for QMP RPCs
Date: Fri, 04 Feb 2022 07:53:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

John Snow <jsnow@redhat.com> writes:

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

The QEMU/QGA part should be easy enough: implement and document a
suitable introspection command, by stealing from query-qmp-schema.

The much more interesting part is putting it to actual use.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]