From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdcr-0006sX-SO for qemu-devel@nongnu.org; Tue, 18 Feb 2014 00:53:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFdcg-0000Aw-0o for qemu-devel@nongnu.org; Tue, 18 Feb 2014 00:53:49 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:50692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFdcf-0000AW-QV for qemu-devel@nongnu.org; Tue, 18 Feb 2014 00:53:37 -0500 Received: from /spool/local by e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Feb 2014 22:53:37 -0700 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id A113819D8036 for ; Mon, 17 Feb 2014 22:53:33 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08026.gho.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1I5rBEa9503224 for ; Tue, 18 Feb 2014 06:53:11 +0100 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1I5rYeH020594 for ; Mon, 17 Feb 2014 22:53:34 -0700 From: mrhines@linux.vnet.ibm.com Date: Tue, 18 Feb 2014 13:53:20 +0800 Message-Id: <1392702802-11592-2-git-send-email-mrhines@linux.vnet.ibm.com> In-Reply-To: <1392702802-11592-1-git-send-email-mrhines@linux.vnet.ibm.com> References: <1392702802-11592-1-git-send-email-mrhines@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v1 1/3] provenance: QMP command to store MigrationInfo from JSON List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: hinesmr@cn.ibm.com, "Michael R. Hines" , quintela@redhat.com From: "Michael R. Hines" This is the QMP documentation and schema for a command that allows the migration protocol on the destination side to 'install' a whole MigrationInfo json structure as received in-tact from the source into the MigrationState struct so that query-migrate can print the information as-is without having to install the values one-by-one. Signed-off-by: Michael R. Hines --- qapi-schema.json | 14 ++++++++++++++ qmp-commands.hx | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 7cfb5e5..c84ca0f 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -717,6 +717,20 @@ 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } ## +# @migrate-set-last-info +# +# Store migration info/statistics. Currently only used by the migration +# protocol itself to tell the destination about the results before +# the source QEMU is destroyed. +# +# @info: json array of MigrationInfo statistics from a previous migration. +# +# Since: 2.0 +## +{ 'command': 'migrate-set-last-info', + 'data': { 'info': 'MigrationInfo' } } + +## # @query-migrate-capabilities # # Returns information about the current migration capabilities status diff --git a/qmp-commands.hx b/qmp-commands.hx index cce6b81..1108940 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3015,6 +3015,39 @@ EQMP .params = "capability:s,state:b", .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities, }, + +SQMP +migrate-set-last-info +------------------------ + +Store migration info/statistics. Currently only used by the migration +protocol itself to tell the destination about the results before +the source QEMU is destroyed. + +NOTE: There is no need to execute this command explicitly except for +testing, as this information is already transmitted as part of the +migration protocol. Thus, there is no HMP command made available for +this option - only QMP. + +The example below is simple, but the migration protocol will actually +transfer the entire JSON string that originated from the source, no +matter what is inside of it, which should survive future version of +QEMU when new statistics are added to the protocol. + +Arguments: +- info: MigrationInfo statistics dictionary (json-object) + +Example: + +-> { "execute": "migrate-set-last-info" , "arguments": + { "info": { "downtime": 1234, "ram" : { "transferred" : 5678 } } } } +EQMP + { + .name = "migrate-set-last-info", + .args_type = "info:O", + .mhandler.cmd_new = qmp_marshal_input_migrate_set_last_info, + }, + SQMP query-migrate-capabilities -------------------------- -- 1.8.1.2