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

Martin Kletzander mkletzan at redhat.com
Wed Oct 5 06:46:44 UTC 2016


On Tue, Oct 04, 2016 at 06:02:27PM +0100, Ian Jackson wrote:
>Currently, osstest wrongly thinks that ARM can do save/restore,
>because `virsh help' does mention the save command (on all
>architectures).
>
>Additionally, check the virth capabilities xpath
>   /capabilities/host/migration_features
>to try to see whether this host supports migration.
>

I think this is pretty accurate.  At least for now.  I can't test the
code, but it looks fine.  Anyway, to stay in the safe waters, I'll just
comment the libvirt part ;)

>I am not sure if this is the right path to check.  Perhaps
>   /capabilities/host/migration_features/live
>is more correct, but this may be wrong if Xen comes to support save/restore
>on ARM, but not live migration (but perhaps libvirt cannot express this
>distinction in which case perhaps it's right after all).
>

I think it does not matter for now.  If you add support for live
migrations, there will be both elements present in the XML, so whatever
you use you will face the same problem.  We should add a capability for
save/restore so that hypervisors, for which it's different thing than
migration, can distinguish that.  Maybe in the future we'll need to add
this per-guest, but I don't see the point right now.

>Signed-off-by: Ian Jackson <Ian.Jackson at eu.citrix.com>
>CC: Julien Grall <julien.grall at arm.com>
>CC: Jim Fehlig <jfehlig at suse.com>
>---
> Osstest/Toolstack/libvirt.pm | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
>diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
>index b7db7af..250fe47 100644
>--- a/Osstest/Toolstack/libvirt.pm
>+++ b/Osstest/Toolstack/libvirt.pm
>@@ -111,7 +111,9 @@ sub check_for_command($$) {
>
> sub saverestore_check ($) {
>     my ($self) = @_;
>-    return check_for_command($self, "save");
>+    return
>+	_check_capability($self, '/capabilities/host/migration_features') &&
>+	check_for_command($self, "save");
> }
>
> sub migrate ($$$$) {
>--
>2.1.4
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20161005/2f1e2e50/attachment-0001.sig>


More information about the libvir-list mailing list