[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] runstate: ignore exit request in finish migrate state
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] runstate: ignore exit request in finish migrate state |
Date: |
Tue, 22 Oct 2019 13:06:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 17/10/19 12:18, Laurent Vivier wrote:
> Trying to reboot a VM while a migration is running can
> move to the prelaunch state (because of the reset) while
> the runstate is in finish migrate state.
> As the logical step after the finish migrate is postmigrate,
> this can create an invalid state transition from prelaunch state
> to postmigrate state and this raises an error and aborts:
>
> invalid runstate transition: 'prelaunch' -> 'postmigrate'
>
> As we are not able to manage reset in finish migrate state the
> best we can do is to ignore any changes and delay them until
> the next state which should be postmigrate and which should allow
> this kind of transition.
>
> Reported-by: Lukáš Doktor <address@hidden>
> Suggested-by: Dr. David Alan Gilbert <address@hidden>
> Signed-off-by: Laurent Vivier <address@hidden>
Queued, thanks.
Paolo
> ---
> vl.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/vl.c b/vl.c
> index 0a295e5d77d6..dc71c822ba24 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1744,6 +1744,9 @@ static bool main_loop_should_exit(void)
> RunState r;
> ShutdownCause request;
>
> + if (runstate_check(RUN_STATE_FINISH_MIGRATE)) {
> + return false;
> + }
> if (preconfig_exit_requested) {
> if (runstate_check(RUN_STATE_PRECONFIG)) {
> runstate_set(RUN_STATE_PRELAUNCH);
>