All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migration: qmp_migrate(): keep working after syntax error
@ 2014-01-02 16:17 Luiz Capitulino
  2014-01-03  1:28 ` Michael R. Hines
  0 siblings, 1 reply; 2+ messages in thread
From: Luiz Capitulino @ 2014-01-02 16:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: quintela, qemu-stable, mrhines

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;
     }
 
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] migration: qmp_migrate(): keep working after syntax error
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Michael R. Hines @ 2014-01-03  1:28 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: qemu-stable, mrhines, qemu-devel, quintela

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-03  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.