From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VytZB-0002KV-Kx for qemu-devel@nongnu.org; Thu, 02 Jan 2014 20:28:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VytZ2-0004Cy-O5 for qemu-devel@nongnu.org; Thu, 02 Jan 2014 20:28:49 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:33851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VytZ2-0004Cs-Go for qemu-devel@nongnu.org; Thu, 02 Jan 2014 20:28:40 -0500 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Jan 2014 18:28:39 -0700 Message-ID: <52C6123B.5070503@linux.vnet.ibm.com> Date: Fri, 03 Jan 2014 09:28:27 +0800 From: "Michael R. Hines" MIME-Version: 1.0 References: <20140102111709.3684c332@redhat.com> In-Reply-To: <20140102111709.3684c332@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] migration: qmp_migrate(): keep working after syntax error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-stable@nongnu.org, mrhines@us.ibm.com, qemu-devel , quintela@redhat.com On 01/03/2014 12:17 AM, Luiz Capitulino wrote: > If a user or QMP client enter a bad syntax for the migrate > command in QMP/HMP, then the migrate command will never succeed > from that point on. > > For example, if you enter: > > (qemu) migrate tcp;0:4444 > migrate: Parameter 'uri' expects a valid migration protocol > > Then the migrate command will always fail from now on: > > (qemu) migrate tcp:0:4444 > migrate: There's a migration process in progress > > The problem is that qmp_migrate() sets the migration status to > MIG_STATE_SETUP and doesn't reset it on syntax error. This bug > was introduced by commit 29ae8a4133082e16970c9d4be09f4b6a15034617. > > Signed-off-by: Luiz Capitulino > --- > migration.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/migration.c b/migration.c > index 2b1ab20..557195a 100644 > --- a/migration.c > +++ b/migration.c > @@ -437,6 +437,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, > #endif > } else { > error_set(errp, QERR_INVALID_PARAMETER_VALUE, "uri", "a valid migration protocol"); > + s->state = MIG_STATE_ERROR; > return; > } > > Reviewed-by: Michael R. Hines