qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael R. Hines" <mrhines@linux.vnet.ibm.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: qemu-stable@nongnu.org, mrhines@us.ibm.com,
	qemu-devel <qemu-devel@nongnu.org>,
	quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH] migration: qmp_migrate(): keep working after syntax error
Date: Fri, 03 Jan 2014 09:28:27 +0800	[thread overview]
Message-ID: <52C6123B.5070503@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140102111709.3684c332@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 <lcapitulino@redhat.com>
> ---
>   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 <mrhines@us.ibm.com>

      reply	other threads:[~2014-01-03  1:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02 16:17 [Qemu-devel] [PATCH] migration: qmp_migrate(): keep working after syntax error Luiz Capitulino
2014-01-03  1:28 ` Michael R. Hines [this message]

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=52C6123B.5070503@linux.vnet.ibm.com \
    --to=mrhines@linux.vnet.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=mrhines@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=quintela@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).