[libvirt] [PATCH v3 10/14] migration: merge all proto branches into single function
Jiri Denemark
jdenemar at redhat.com
Wed Sep 30 13:38:21 UTC 2015
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 at virtuozzo.com>
> ---
> 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
More information about the libvir-list
mailing list