From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: peterx@redhat.com, eblake@redhat.com, stefanha@redhat.com,
dgilbert@redhat.com
Subject: [Qemu-devel] [PATCH 03/32] docs/interop/qmp: Improve OOB documentation
Date: Mon, 2 Jul 2018 18:21:49 +0200 [thread overview]
Message-ID: <20180702162218.13678-4-armbru@redhat.com> (raw)
In-Reply-To: <20180702162218.13678-1-armbru@redhat.com>
OOB documentation is spread over qmp-spec.txt sections 2.2.1
Capabilities and 2.3 Issuing Commands. The amount of detail is a bit
distracting there. Move the meat of the matter to new section 2.3.1
Out of band execution.
Throw in a few other improvements while there:
* 2.2 Server Greetung: Drop advice to search entire capabilities
array; should be obvious.
* 3. QMP Examples
- 3.1 Server Greeting: Update greeting to current one. Now shows
capability "oob". Update qmp-intro.txt likewise.
- 3.2 Capabilities negotiation: Show client accepting capability
"oob".
- 3.7 Out-of-band execution: New.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
docs/interop/qmp-intro.txt | 13 +++----
docs/interop/qmp-spec.txt | 74 +++++++++++++++++++++++++-------------
2 files changed, 56 insertions(+), 31 deletions(-)
diff --git a/docs/interop/qmp-intro.txt b/docs/interop/qmp-intro.txt
index 900d69d612..3dafa35ea6 100644
--- a/docs/interop/qmp-intro.txt
+++ b/docs/interop/qmp-intro.txt
@@ -52,13 +52,14 @@ Escape character is '^]'.
"QMP": {
"version": {
"qemu": {
- "micro": 50,
- "minor": 6,
- "major": 1
- },
- "package": ""
- },
+ "micro": 50,
+ "minor": 12,
+ "major": 2
+ },
+ "package": "v2.12.0-1763-g4e022f5ccd"
+ },
"capabilities": [
+ "oob"
]
}
}
diff --git a/docs/interop/qmp-spec.txt b/docs/interop/qmp-spec.txt
index 2bb492d1ea..e5f8116c54 100644
--- a/docs/interop/qmp-spec.txt
+++ b/docs/interop/qmp-spec.txt
@@ -77,8 +77,7 @@ The greeting message format is:
is the same of the query-version command)
- The "capabilities" member specify the availability of features beyond the
baseline specification; the order of elements in this array has no
- particular significance, so a client must search the entire array
- when looking for a particular capability
+ particular significance.
2.2.1 Capabilities
------------------
@@ -86,16 +85,7 @@ The greeting message format is:
Currently supported capabilities are:
- "oob": the QMP server supports "out-of-band" (OOB) command
- execution. For more details, please see the "run-oob" parameter in
- the "Issuing Commands" section below. Not all commands allow this
- "oob" execution. The "query-qmp-schema" command can be used to
- inspect which commands support "oob" execution.
-
-QMP clients can get a list of supported QMP capabilities of the QMP
-server in the greeting message mentioned above. By default, all the
-capabilities are off. To enable any QMP capabilities, the QMP client
-needs to send the "qmp_capabilities" command with an extra parameter
-for the requested capabilities.
+ execution, as described in section "2.3.1 Out-of-band execution".
2.3 Issuing Commands
--------------------
@@ -115,14 +105,38 @@ The format for command execution is:
- The "id" member is a transaction identification associated with the
command execution. It is required for all commands if the OOB -
capability was enabled at startup, and optional otherwise. The same
- "id" field will be part of the response if provided. The "id" member
- can be any json-value, although most clients merely use a
- json-number incremented for each successive command
-- The "control" member is optional, and currently only used for
- out-of-band execution. The handling or response of an "oob" command
- can overtake prior in-band commands. To enable "oob" handling of a
- particular command, just provide a control field with: { "control":
- { "run-oob": true } }
+ "id" field will be part of the response if provided. The "id"
+ member can be any json-value. A json-number incremented for each
+ successive command works fine.
+- The optional "control" member further specifies how the command is
+ to be executed. Currently, its only member is optional "run-oob".
+ See section "2.3.1 Out-of-band execution" for details.
+
+
+2.3.1 Out-of-band execution
+---------------------------
+
+The server normally reads, executes and responds to one command after
+the other. The client therefore receives command respones in issue
+order.
+
+With out-of-band execution enabled via capability negotiation (section
+4.), the server reads and queues commands as they arrive. It executes
+commands from the queue one after the other. Commands executed
+out-of-band jump the queue: they command get executed right away,
+possibly overtaking prior in-band commands. The client may therefore
+receive such a command's response before responses from prior in-band
+commands.
+
+To execute a command out-of-band, the client puts "run-oob": true into
+execute's member "control".
+
+If the client sends in-band commands faster than the server can
+execute them, the server will eventually drop commands to limit the
+queue length. The sever sends event COMMAND_DROPPED then.
+
+Only a few commands support out-of-band execution. The ones that do
+have "allow-oob": true in output of query-qmp-schema.
2.4 Commands Responses
----------------------
@@ -223,12 +237,13 @@ This section provides some examples of real QMP usage, in all of them
3.1 Server greeting
-------------------
-S: { "QMP": { "version": { "qemu": { "micro": 50, "minor": 6, "major": 1 },
- "package": ""}, "capabilities": []}}
+S: { "QMP": {"version": {"qemu": {"micro": 50, "minor": 12, "major": 2},
+ "package": "v2.12.0-1763-g4e022f5ccd"}, "capabilities": ["oob"] } }
-3.2 Client QMP negotiation
---------------------------
-C: { "execute": "qmp_capabilities" }
+3.2 Capabilities negotiation
+----------------------------
+
+C: { "execute": "qmp_capabilities", "arguments": { "enable": ["oob"] } }
S: { "return": {}}
3.3 Simple 'stop' execution
@@ -255,6 +270,15 @@ S: { "error": { "class": "GenericError", "desc": "Invalid JSON syntax" } }
S: { "timestamp": { "seconds": 1258551470, "microseconds": 802384 },
"event": "POWERDOWN" }
+3.7 Out-of-band execution
+-------------------------
+
+C: { "execute": "migrate-pause", "id": 42, "control": { "run-oob": true } }
+S: { "id": 42,
+ "error": { "class": "GenericError",
+ "desc": "migrate-pause is currently only supported during postcopy-active state" } }
+
+
4. Capabilities Negotiation
===========================
--
2.17.1
next prev parent reply other threads:[~2018-07-02 16:22 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 16:21 [Qemu-devel] [PATCH 00/32] qmp: Fixes and cleanups around OOB commands Markus Armbruster
2018-07-02 16:21 ` [Qemu-devel] [PATCH 01/32] qmp: Say "out-of-band" instead of "Out-Of-Band" Markus Armbruster
2018-07-02 20:46 ` Eric Blake
2018-07-02 16:21 ` [Qemu-devel] [PATCH 02/32] monitor: Spell "I/O thread" consistently in comments Markus Armbruster
2018-07-02 20:48 ` Eric Blake
2018-07-02 16:21 ` Markus Armbruster [this message]
2018-07-02 20:54 ` [Qemu-devel] [PATCH 03/32] docs/interop/qmp: Improve OOB documentation Eric Blake
2018-07-03 6:01 ` Markus Armbruster
2018-07-02 16:21 ` [Qemu-devel] [PATCH 04/32] qmp: Document COMMAND_DROPPED design flaw Markus Armbruster
2018-07-02 20:58 ` Eric Blake
2018-07-02 16:21 ` [Qemu-devel] [PATCH 05/32] qmp: Get rid of x-oob-test command Markus Armbruster
2018-07-02 21:08 ` Eric Blake
2018-07-03 6:05 ` Markus Armbruster
2018-07-02 16:21 ` [Qemu-devel] [PATCH 06/32] tests/qmp-test: Test in-band command doesn't overtake Markus Armbruster
2018-07-02 21:09 ` Eric Blake
2018-07-02 16:21 ` [Qemu-devel] [PATCH 07/32] qmp: Make "id" optional again even in "oob" monitors Markus Armbruster
2018-07-02 21:13 ` Eric Blake
2018-07-03 6:06 ` Markus Armbruster
2018-07-03 3:36 ` Peter Xu
2018-07-03 6:14 ` Markus Armbruster
2018-07-03 6:24 ` Peter Xu
2018-07-03 9:08 ` Daniel P. Berrangé
2018-07-02 16:21 ` [Qemu-devel] [PATCH 08/32] tests/test-qga: Demonstrate the guest-agent ignores "id" Markus Armbruster
2018-07-02 21:15 ` Eric Blake
2018-07-03 6:27 ` Markus Armbruster
2018-07-02 16:21 ` [Qemu-devel] [PATCH 09/32] qmp qemu-ga: Revert change that accidentally made qemu-ga accept "id" Markus Armbruster
2018-07-02 21:44 ` Eric Blake
2018-07-02 16:21 ` [Qemu-devel] [PATCH 10/32] tests/test-qga: Demonstrate the guest-agent ignores "control" Markus Armbruster
2018-07-03 1:47 ` Eric Blake
2018-07-03 6:29 ` Markus Armbruster
2018-07-02 16:21 ` [Qemu-devel] [PATCH 11/32] qmp qemu-ga: Fix qemu-ga not to accept "control" Markus Armbruster
2018-07-03 1:49 ` Eric Blake
2018-07-02 16:21 ` [Qemu-devel] [PATCH 12/32] qmp: Redo how the client requests out-of-band execution Markus Armbruster
2018-07-03 1:57 ` Eric Blake
2018-07-02 16:21 ` [Qemu-devel] [PATCH 13/32] qmp: Revert change to handle_qmp_command tracepoint Markus Armbruster
2018-07-03 1:58 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 14/32] qmp: Always free QMPRequest with qmp_request_free() Markus Armbruster
2018-07-03 2:01 ` Eric Blake
2018-07-03 6:38 ` Markus Armbruster
2018-07-02 16:22 ` [Qemu-devel] [PATCH 15/32] qmp: Simplify code around monitor_qmp_dispatch_one() Markus Armbruster
2018-07-03 2:04 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 16/32] tests/qmp-test: Demonstrate QMP errors jumping the queue Markus Armbruster
2018-07-03 2:07 ` Eric Blake
2018-07-03 6:20 ` Peter Xu
2018-07-03 6:54 ` Markus Armbruster
2018-07-02 16:22 ` [Qemu-devel] [PATCH 17/32] qmp: Don't let malformed in-band commands jump " Markus Armbruster
2018-07-03 2:11 ` Eric Blake
2018-07-03 6:46 ` Markus Armbruster
2018-07-02 16:22 ` [Qemu-devel] [PATCH 18/32] qmp: Don't let JSON errors " Markus Armbruster
2018-07-03 2:13 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 19/32] monitor: Rename use_io_thr to use_io_thread Markus Armbruster
2018-07-03 2:13 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 20/32] monitor: Peel off @mon_global wrapper Markus Armbruster
2018-07-03 2:15 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 21/32] qobject: New qdict_from_jsonf_nofail() Markus Armbruster
2018-07-03 2:16 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 22/32] qmp: De-duplicate error response building Markus Armbruster
2018-07-03 2:18 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 23/32] qmp: Use QDict * instead of QObject * for response objects Markus Armbruster
2018-07-03 2:21 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 24/32] qmp: Replace monitor_json_emitter{, raw}() by qmp_{queue, send}_response() Markus Armbruster
2018-07-03 2:25 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 25/32] qmp: Replace get_qmp_greeting() by qmp_greeting() Markus Armbruster
2018-07-03 2:26 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 26/32] qmp: Simplify monitor_qmp_respond() Markus Armbruster
2018-07-03 2:28 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 27/32] qmp: Add some comments around null responses Markus Armbruster
2018-07-03 2:28 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 28/32] qmp: Switch timestamp_put() to qdict_from_jsonf_nofail() Markus Armbruster
2018-07-03 2:29 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 29/32] qobject: Let qobject_from_jsonf() fail instead of abort Markus Armbruster
2018-07-03 2:30 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 30/32] qmp: Clean up capability negotiation after commit 02130314d8c Markus Armbruster
2018-07-03 2:33 ` Eric Blake
2018-07-03 6:50 ` Markus Armbruster
2018-07-02 16:22 ` [Qemu-devel] [PATCH 31/32] monitor: Improve some comments Markus Armbruster
2018-07-03 2:36 ` Eric Blake
2018-07-02 16:22 ` [Qemu-devel] [PATCH 32/32] qapi: Polish command flags documentation in qapi-code-gen.txt Markus Armbruster
2018-07-03 2:38 ` Eric Blake
2018-07-03 5:35 ` [Qemu-devel] [PATCH 00/32] qmp: Fixes and cleanups around OOB commands Markus Armbruster
2018-07-03 6:36 ` Peter Xu
2018-07-03 6:57 ` Markus Armbruster
2018-07-03 7:05 ` Marc-André Lureau
2018-07-03 8:36 ` Markus Armbruster
2018-07-03 9:08 ` 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=20180702162218.13678-4-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).