Message ID | 20250211150136.6781-5-farosas@suse.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | migration: Fix issues during qmp_migrate_cancel | expand |
On Tue, Feb 11, 2025 at 12:01:31PM -0300, Fabiano Rosas wrote: > If the destination side fails at migration_ioc_process_incoming() > before starting the coroutine, it will report the error but QEMU will > not exit. > > Set the migration state to FAILED and exit the process if > exit-on-error allows. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2633 > Reported-by: Daniel P. Berrangé <berrange@redhat.com> > Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Peter Xu <peterx@redhat.com>
diff --git a/migration/channel.c b/migration/channel.c index 24a91ef911..a547b1fbfe 100644 --- a/migration/channel.c +++ b/migration/channel.c @@ -33,6 +33,7 @@ void migration_channel_process_incoming(QIOChannel *ioc) { MigrationState *s = migrate_get_current(); + MigrationIncomingState *mis = migration_incoming_get_current(); Error *local_err = NULL; trace_migration_set_incoming_channel( @@ -47,6 +48,10 @@ void migration_channel_process_incoming(QIOChannel *ioc) if (local_err) { error_report_err(local_err); + migrate_set_state(&s->state, s->state, MIGRATION_STATUS_FAILED); + if (mis->exit_on_error) { + exit(EXIT_FAILURE); + } } }
If the destination side fails at migration_ioc_process_incoming() before starting the coroutine, it will report the error but QEMU will not exit. Set the migration state to FAILED and exit the process if exit-on-error allows. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2633 Reported-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> --- migration/channel.c | 5 +++++ 1 file changed, 5 insertions(+)