qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 01/27] migration: Network Failover can't work with a pause


From: Dr. David Alan Gilbert
Subject: Re: [PATCH v2 01/27] migration: Network Failover can't work with a paused guest
Date: Wed, 25 Nov 2020 12:05:15 +0000
User-agent: Mutt/1.14.6 (2020-07-11)

* Juan Quintela (quintela@redhat.com) wrote:
> If we have a paused guest, it can't unplug the network VF device, so
> we wait there forever.  Just change the code to give one error on that
> case.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/migration.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/migration/migration.c b/migration/migration.c
> index 87a9b59f83..d44fc880f9 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -3548,6 +3548,18 @@ static void *migration_thread(void *opaque)
>      qemu_savevm_state_setup(s->to_dst_file);
>  
>      if (qemu_savevm_state_guest_unplug_pending()) {
> +        /* if guest is paused, it can send back the wait event */
> +        if (!runstate_is_running()) {
> +            Error *local_err = NULL;
> +
> +            error_setg(&local_err, "migration: network failover and "
> +                       "guest is paused'");
> +            migrate_set_error(s, local_err);
> +            error_free(local_err);
> +            migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
> +                              MIGRATION_STATUS_FAILED);
> +            goto end;
> +        }
>          migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
>                            MIGRATION_STATUS_WAIT_UNPLUG);
>  
> @@ -3597,6 +3609,7 @@ static void *migration_thread(void *opaque)
>      }
>  
>      trace_migration_thread_after_loop();
> +end:
>      migration_iteration_finish(s);
>      object_unref(OBJECT(s));
>      rcu_unregister_thread();
> -- 
> 2.26.2
> 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]