]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: Report error in incoming migration
authorFabiano Rosas <farosas@suse.de>
Thu, 4 Jan 2024 14:21:41 +0000 (11:21 -0300)
committerPeter Xu <peterx@redhat.com>
Tue, 16 Jan 2024 03:16:09 +0000 (11:16 +0800)
We're not currently reporting the errors set with migrate_set_error()
when incoming migration fails.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240104142144.9680-5-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/migration.c

index 2365a3a13c977c01b49136abd1f2cc7c424a8d03..219447dea174ee69f3f9760fa9ee8fa0c804bbe7 100644 (file)
@@ -697,6 +697,13 @@ process_incoming_migration_co(void *opaque)
     }
 
     if (ret < 0) {
+        MigrationState *s = migrate_get_current();
+
+        if (migrate_has_error(s)) {
+            WITH_QEMU_LOCK_GUARD(&s->error_mutex) {
+                error_report_err(s->error);
+            }
+        }
         error_report("load of migration failed: %s", strerror(-ret));
         goto fail;
     }