From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Kletzander Subject: Re: [libvirt] [OSSTEST PATCH 2/2] libvirt: Do not attempt save/restore when migration not advertised Date: Wed, 5 Oct 2016 08:46:44 +0200 Message-ID: <20161005064644.GF16414@wheatley> References: <1475600547-1009-1-git-send-email-ian.jackson@eu.citrix.com> <1475600547-1009-3-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1242349249186194707==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1brfyb-0003p9-Or for xen-devel@lists.xenproject.org; Wed, 05 Oct 2016 06:46:49 +0000 In-Reply-To: <1475600547-1009-3-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Ian Jackson Cc: libvir-list@redhat.com, xen-devel@lists.xenproject.org, Julien Grall List-Id: xen-devel@lists.xenproject.org --===============1242349249186194707== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R6sEYoIZpp9JErk7" Content-Disposition: inline --R6sEYoIZpp9JErk7 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline 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 >CC: Julien Grall >CC: Jim Fehlig >--- > 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@redhat.com >https://www.redhat.com/mailman/listinfo/libvir-list --R6sEYoIZpp9JErk7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJX9KHUAAoJEAgfwp8kF4bdW5kP/iDJdDOCybeKT0RhVpEEa/wt HpCmFXd2eCMP4RWKnET5mb6WaZxvkHXNL1z6B6hRaPJ/wEzXlJcuN75nNbb0P/zd wz1lpRCW9Nvx66Sa7T3teAFcd9qlMwIkkDLEY00/i8m+i5P32izuy3EHxpvleNIa Muy+Tz4oYiZ/pf3vQXjFD7etBSLmsQ7KDBMm/ujOVb5nkAMIdRHfyIRnuHaTn9DL 4/g2P9BaSo+MljhcmEdRkl9VHlgcS2wp/NjXJPqoNn54aA42t8B4DLOV1Ugs3pTl tXKaojt0FxZJML8Y0HmS/uhDqceoPoBTcwX9kj3VcCRR79WIddmyBf9NrqYwxPlA xxdvcTqpLcVxo2Jlt3mo31YVhL2++O3hFv/8Gkj9IORP0Rs39ua/TUIdq4LpQY3h /rkFIR35MC9rL24Si1BaFYbKCf+iepBTn5cD5HjvT8SK+ZOqm1rOplf8kE8gWuQQ kDT3AuhygQgcUjbxmv6FjX+U5Z+twhMU0Kz6dMQtTcKy9LBmRkZjm8Dxx3PZQbCv BXEfOQ+lKtbA4S0A9QjhMBAp+ufZoXfsxj0KBEmMpAFfSlSIwuIeU9jyNILJEV7a YvCGXlyTXGGTzpgstPaQiQGgr1/Tsw9jOKbG2wf33Ul6yajHstVnVUs5xDDNYC1j 5Kwh0db7V0gkmpMHeQWt =YpZ/ -----END PGP SIGNATURE----- --R6sEYoIZpp9JErk7-- --===============1242349249186194707== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============1242349249186194707==--