From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33863) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRQfn-0004EU-Uy for qemu-devel@nongnu.org; Mon, 07 May 2012 12:20:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRQfm-00018h-4M for qemu-devel@nongnu.org; Mon, 07 May 2012 12:20:31 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:58790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRQfl-00018L-Lr for qemu-devel@nongnu.org; Mon, 07 May 2012 12:20:29 -0400 Received: by obbwd20 with SMTP id wd20so10259826obb.4 for ; Mon, 07 May 2012 09:20:27 -0700 (PDT) Sender: fluxion Date: Mon, 7 May 2012 11:20:23 -0500 From: Michael Roth Message-ID: <20120507162023.GC3369@illuin> References: <1336162822-13161-1-git-send-email-lcapitulino@redhat.com> <1336162822-13161-4-git-send-email-lcapitulino@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1336162822-13161-4-git-send-email-lcapitulino@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/6] qemu-ga: guest-shutdown: don't emit a success response List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mprivozn@redhat.com On Fri, May 04, 2012 at 05:20:19PM -0300, Luiz Capitulino wrote: > Today, qemu-ga may not be able to emit a success response when > guest-shutdown completes. This happens because the VM may vanish > before qemu-ga is able to emit a response. > > This semantic is a bit confusing, as it's not clear for clients if > they should wait for a response or how they should check for success. > > This commit solves that problem by changing guest-shutdown to never > emit a success response and suggests in the documentation what > clients could do to check for success. > > Signed-off-by: Luiz Capitulino > --- > qapi-schema-guest.json | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/qapi-schema-guest.json b/qapi-schema-guest.json > index d7a073e..0aa9f91 100644 > --- a/qapi-schema-guest.json > +++ b/qapi-schema-guest.json > @@ -131,11 +131,13 @@ > # > # @mode: #optional "halt", "powerdown" (default), or "reboot" > # > -# Returns: Nothing on success > +# Returns: This command does NOT return a response on success. Success > +# condition is indicated by the VM exiting with a zero exit status. Would also include something like: 'or, when running with --no-shutdown, by running the query-status QMP command to confirm the status/RunState is "shutdown"' Reviewed-by: Michael Roth > # > # Since: 0.15.0 > ## > -{ 'command': 'guest-shutdown', 'data': { '*mode': 'str' } } > +{ 'command': 'guest-shutdown', 'data': { '*mode': 'str' }, > + 'success-response': 'no' } > > ## > # @guest-file-open: > -- > 1.7.9.2.384.g4a92a >