[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 14/14] migration: qmp_migrate(): keep working after s
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PULL 14/14] migration: qmp_migrate(): keep working after syntax error |
Date: |
Mon, 6 Jan 2014 17:03:15 -0500 |
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.
Reviewed-by: Michael R. Hines <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
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
- [Qemu-devel] [PULL 08/14] error: Add error_abort, (continued)
- [Qemu-devel] [PULL 08/14] error: Add error_abort, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 05/14] qom: catch errors in object_property_add_child, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 09/14] qdev: Delete dead code, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 06/14] monitor: add object-del (QMP) and object_del (HMP) command, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 04/14] qom: fix leak for objects created with -object, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 12/14] qemu-option: Remove qemu_opts_create_nofail, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 10/14] hw: Remove assert_no_error usages, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 11/14] target-i386: Remove assert_no_error usage, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 07/14] monitor: add object-add (QMP) and object_add (HMP) command, Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 13/14] qerror: Remove assert_no_error(), Luiz Capitulino, 2014/01/06
- [Qemu-devel] [PULL 14/14] migration: qmp_migrate(): keep working after syntax error,
Luiz Capitulino <=
- Re: [Qemu-devel] [PULL 00/14] QMP queue, Peter Maydell, 2014/01/06
- Re: [Qemu-devel] [PULL 00/14] QMP queue, Peter Crosthwaite, 2014/01/13