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

Re: [XEN PATCH] libxc/migration: Abort migration on precopy policy request



On Tue, Apr 07, 2020 at 02:52:22PM +0000, Andrew Panyakin wrote:
> 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.
> 

Right. I think this is a real problem.

> Signed-off-by: Andrew Panyakin <apanyaki@xxxxxxxxxx>
> ---
>  tools/libxc/xc_sr_save.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/libxc/xc_sr_save.c b/tools/libxc/xc_sr_save.c
> index fa736a311f..507274ce22 100644
> --- a/tools/libxc/xc_sr_save.c
> +++ b/tools/libxc/xc_sr_save.c
> @@ -560,6 +560,12 @@ static int send_memory_live(struct xc_sr_context *ctx)
>  
>      }
>  
> +    if ( policy_decision == XGS_POLICY_ABORT ) {

The { should be on a new line.

> +        PERROR("Abort precopy loop");
> +        rc = -1;
> +        goto out;

There is no need to have "goto out" here.

These can be fixed easily while committing, so no need to resend yet. I
will give other people a chance to comment.

Wei.

> +    }
> +
>   out:
>      xc_set_progress_prefix(xch, NULL);
>      free(progress_str);
> -- 
> 2.16.6
> 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.