Re: [PATCH v3 10/14] migration: merge all proto branches into single function

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

 



On Fri, Sep 18, 2015 at 18:05:48 +0300, Nikolay Shirokovskiy wrote:
> Finally on this step we get what we were aimed for - toURI{1, 2} (and
> migration{*} APIs too) now can work thru V3_PARAMS protocol. Execution path
> goes thru unchanged virDomainMigrateUnmanaged adapter function which is called
> by all target places.
> 
> Note that we keep the fact that direct migration never works
> thru V3_PARAMS proto. We can't change this aspect without
> further investigation.
> 
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
> ---
>  src/libvirt-domain.c |   56 ++++++++++++++-----------------------------------
>  1 files changed, 16 insertions(+), 40 deletions(-)
> 
> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
> index abed9d6..5c22460 100644
> --- a/src/libvirt-domain.c
> +++ b/src/libvirt-domain.c
> @@ -3432,8 +3432,19 @@ virDomainMigrateUnmanagedParams(virDomainPtr domain,
>          virDomainMigrateCheckNotLocal(dconnuri) < 0)
>          return -1;
>  
> -    if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
> -                                 VIR_DRV_FEATURE_MIGRATION_V3)) {
> +    if ((flags & VIR_MIGRATE_PEER2PEER) &&

I though one of the reason you're doing all this is to remove the need
to implement older API for direct migration so I was expecting this part
of the condition to go away...

> +        VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
> +                                 VIR_DRV_FEATURE_MIGRATION_PARAMS)) {
> +        VIR_DEBUG("Using migration protocol 3 with extensible parameters");
> +        if (!domain->conn->driver->domainMigratePerform3Params) {
> +            virReportUnsupportedError();
> +            return -1;
> +        }
> +        return domain->conn->driver->domainMigratePerform3Params
> +                (domain, dconnuri, params, nparams,
> +                 NULL, 0, NULL, NULL, flags);
> +    } else if (VIR_DRV_SUPPORTS_FEATURE(domain->conn->driver, domain->conn,
> +                                        VIR_DRV_FEATURE_MIGRATION_V3)) {
>          VIR_DEBUG("Using migration protocol 3");
>          if (!domain->conn->driver->domainMigratePerform3) {
>              virReportUnsupportedError();

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]