Skip to content

Commit

Permalink
libxc/migration: Abort migration on precopy policy request
Browse files Browse the repository at this point in the history
libxc defines XGS_POLICY_ABORT for precopy policy to signal that migration
should be aborted (eg. if the estimated pause time is too huge for the
instance). Default simple precopy policy never returns that, but it could be
overriden with a custom one.

Signed-off-by: Andrew Panyakin <[email protected]>
Acked-by: Wei Liu <[email protected]>
[wei: fix coding style issue]
  • Loading branch information
paniakin-aws authored and liuw committed Apr 9, 2020
1 parent 9be0b27 commit 69f7413
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/libxc/xc_sr_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,13 @@ static int send_memory_live(struct xc_sr_context *ctx)

}

if ( policy_decision == XGS_POLICY_ABORT )
{
PERROR("Abort precopy loop");
rc = -1;
goto out;
}

out:
xc_set_progress_prefix(xch, NULL);
free(progress_str);
Expand Down

0 comments on commit 69f7413

Please sign in to comment.