[libvirt] [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised

Ian Jackson ian.jackson at eu.citrix.com
Thu Oct 6 16:44:33 UTC 2016


Martin Kletzander writes ("Re: [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised"):
> Well then, unfortunately you do.
> 
> Also, looking at how the code is structured, if you have live migration
> but don't have save/restore, you won't have <migration_features/> there
> at all.

Right.  OK, thanks.  I will add the patch below to my osstest queue.

Ian.

>From 5330ff9222e4e611505149945eef7dc074b4f9b5 Mon Sep 17 00:00:00 2001
In-Reply-To: <20161006104255.GP16414 at wheatley>
References: <20161006104255.GP16414 at wheatley>
From: Ian Jackson <ian.jackson at eu.citrix.com>
Date: Thu, 6 Oct 2016 17:38:29 +0100
Subject: [OSSTEST PATCH 3/2] libvirt: Check /capabilities/host/migration_features/live for live migration
Cc: libvir-list at redhat.com

libvirt is capable of advertising this separately from
/capabilities/host/migration_features, so if save/restore is supported
but live migration is not, this will do the right thing.

We would have preferred libvirt to advertise
  /capabilities/host/migration_features/save
or something, but it doesn't right now, so we continue to use
  /capabilities/host/migration_features
to detect save/restore support.

If libvirt changes its feature presentation, then at some future point
we should change osstest too.

Signed-off-by: Ian Jackson <Ian.Jackson at eu.citrix.com>
CC: Martin Kletzander <mkletzan at redhat.com>
CC: Jim Fehlig <jfehlig at suse.com>
---
 Osstest/Toolstack/libvirt.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 250fe47..81e724d 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -93,7 +93,8 @@ sub migrate_check ($$) {
         # local migration is not supported
         $rc = 1;
     } else {
-	$rc = $self->check_capability('/capabilities/host/migration_features');
+	$rc = $self->check_capability
+	    ('/capabilities/host/migration_features/live');
     }
 
     logm("rc=$rc");
-- 
2.1.4




More information about the libvir-list mailing list