[PATCH] migration: Fix the re-run check of the migrate-incoming command

Yury Kotov posted 1 patch 4 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20191113175325.29765-1-yury-kotov@yandex-team.ru
Test asan passed
Test checkpatch passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test docker-quick@centos7 passed
Maintainers: "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Juan Quintela <quintela@redhat.com>
migration/migration.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] migration: Fix the re-run check of the migrate-incoming command
Posted by Yury Kotov 4 years, 5 months ago
The current check sets an error but doesn't fail the command.
This may cause a problem if new connection attempt by the same URI
affects the first connection.

Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>
---
 migration/migration.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/migration/migration.c b/migration/migration.c
index 354ad072fa..fa2005b49f 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1784,6 +1784,7 @@ void qmp_migrate_incoming(const char *uri, Error **errp)
     }
     if (!once) {
         error_setg(errp, "The incoming migration has already been started");
+        return;
     }
 
     qemu_start_incoming_migration(uri, &local_err);
-- 
2.24.0


Re: [PATCH] migration: Fix the re-run check of the migrate-incoming command
Posted by Darren Kenny 4 years, 5 months ago
On Wed, Nov 13, 2019 at 08:53:25PM +0300, Yury Kotov wrote:
>The current check sets an error but doesn't fail the command.
>This may cause a problem if new connection attempt by the same URI
>affects the first connection.
>
>Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>

>---
> migration/migration.c | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/migration/migration.c b/migration/migration.c
>index 354ad072fa..fa2005b49f 100644
>--- a/migration/migration.c
>+++ b/migration/migration.c
>@@ -1784,6 +1784,7 @@ void qmp_migrate_incoming(const char *uri, Error **errp)
>     }
>     if (!once) {
>         error_setg(errp, "The incoming migration has already been started");
>+        return;
>     }
>
>     qemu_start_incoming_migration(uri, &local_err);
>-- 
>2.24.0
>
>

Re: [PATCH] migration: Fix the re-run check of the migrate-incoming command
Posted by Juan Quintela 4 years, 3 months ago
Yury Kotov <yury-kotov@yandex-team.ru> wrote:
> The current check sets an error but doesn't fail the command.
> This may cause a problem if new connection attempt by the same URI
> affects the first connection.
>
> Signed-off-by: Yury Kotov <yury-kotov@yandex-team.ru>

Reviewed-by: Juan Quintela <quintela@redhat.com>

queued