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

Re: [libvirt] [PATCH] Fix migration in xend driver



On Tue, Jan 12, 2010 at 11:33:31AM -0700, Jim Fehlig wrote:
> Upstream xen has changed parameters to the migration operation
> several times over the past 18 months.  Changeset 17553 removed
> the resouce parameter,  Changesets 17709, 17753, and 20326 added
> ssl, node, and change_home_server parameters respectively.
> 
> Fortunately, testing has revealed that xend will fail the
> operation if a parameter is missing but happily honor it if
> unknown parameters are provided.  Thus all currently supported
> parameters can be provided, satisfying current xend but not
> regressing older versions.
> ---
>  src/xen/xend_internal.c |   14 ++++++++++----
>  1 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
> index be033f5..d9bfa15 100644
> --- a/src/xen/xend_internal.c
> +++ b/src/xen/xend_internal.c
> @@ -4553,15 +4553,21 @@ xenDaemonDomainMigratePerform (virDomainPtr domain,
>  
>      DEBUG("hostname = %s, port = %s", hostname, port);
>  
> -    /* Make the call. */
> +    /* Make the call.
> +     * NB:  xend will fail the operation if any parameters are
> +     * missing but happily accept unknown parameters.  This works
> +     * to our advantage since all parameters supported and required
> +     * by current xend can be included without breaking older xend.
> +     */
>      ret = xend_op (domain->conn, domain->name,
>                     "op", "migrate",
>                     "destination", hostname,
>                     "live", live,
>                     "port", port,
> -                   "node", "-1",
> -                   "ssl", "0",
> -                   "resource", "0", /* required, xend ignores it */
> +                   "node", "-1", /* xen-unstable c/s 17753 */
> +                   "ssl", "0", /* xen-unstable c/s 17709 */
> +                   "change_home_server", "0", /* xen-unstable c/s 20326 */
> +                   "resource", "0", /* removed by xen-unstable c/s 17553 */
>                     NULL);
>      VIR_FREE (hostname);
>  

ACK


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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