From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSM16-0004q5-Fq for qemu-devel@nongnu.org; Mon, 02 Mar 2015 03:47:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSM12-0006VU-CZ for qemu-devel@nongnu.org; Mon, 02 Mar 2015 03:47:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34000) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSM12-0006V0-4e for qemu-devel@nongnu.org; Mon, 02 Mar 2015 03:47:52 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t228lpmR030108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 2 Mar 2015 03:47:51 -0500 Date: Mon, 2 Mar 2015 08:47:46 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20150302084746.GA2292@work-vm> References: <1424962481-16439-1-git-send-email-dgilbert@redhat.com> <1424962481-16439-4-git-send-email-dgilbert@redhat.com> <20150302063257.GH26196@grmbl.mre> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150302063257.GH26196@grmbl.mre> Subject: Re: [Qemu-devel] [PATCH 3/3] migrate_incoming: Cleanup/clarify error messages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: quintela@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com * Amit Shah (amit.shah@redhat.com) wrote: > On (Thu) 26 Feb 2015 [14:54:41], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Create a separate error for the case where migrate_incoming is > > used after a succesful migrate_incoming. > > > > Reword the error in the case where '-incoming defer' is missing > > to omit the command name so it's right for both hmp and qmp. > > > > Signed-off-by: Dr. David Alan Gilbert > > --- > > migration/migration.c | 8 ++++++-- > > 1 file changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/migration/migration.c b/migration/migration.c > > index 2c805f1..e6ac3de 100644 > > --- a/migration/migration.c > > +++ b/migration/migration.c > > @@ -435,11 +435,15 @@ void migrate_del_blocker(Error *reason) > > void qmp_migrate_incoming(const char *uri, Error **errp) > > { > > Error *local_err = NULL; > > + static bool once = true; > > > > if (!deferred_incoming) { > > - error_setg(errp, "'-incoming defer' is required for migrate_incoming"); > > + error_setg(errp, "For use with '-incoming defer'"); > > return; > > } > > + if (!once) { > > + error_setg(errp, "The incoming migration has already been started"); > > Let me apologise in advance for picking on another error message... > > This reads like we already have an incoming migration, when we mean we > just have a URI for one. No, if you hit this error you have at least started listening on the connection. Dave > > Amit -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK