Re: [libvirt] [Xen-devel] [PATCH RFC OSSTEST 7/9] Toolstack: Abstract away migration support check.

Jim Fehlig wrote:
Ian Campbell wrote:
Jim,
What would be the right thing to do for this? The intention is for osstest to skip migration tests when that feature is unimplemented by the toolstack/xen/arch combination.
It looks like the output of "virsh capabilities" indicates migration: <migration_features> <live/> <uri_transports> <uri_transport>tcp</uri_transport> </uri_transports> </migration_features> is that the right place to look?
Yes.
Will this capability be automagically suppressed on ARM until we implement it?
Unfortunately, no :-/. Currently, the libvirt libxl driver will include <migration_features> and call save, restore, and migrate regardless of arch.
FYI xl uses LIBXL_HAVE_NO_SUSPEND_RESUME to figure this out...
Ah, interesting. Thanks for the tip. I'll need to add similar logic in the libxl driver.
Something like the attached patch (compile-tested only). You'll need an updated libvirt.git master to apply cleanly. Regards, Jim

On Tue, 2014-06-24 at 21:18 -0600, Jim Fehlig wrote:
Something like the attached patch (compile-tested only). You'll need an updated libvirt.git master to apply cleanly.
Thanks. Building on ARM I get: libxl/libxl_driver.c:4346:1: error: 'libxlDomainMigrateBegin3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4384:1: error: 'libxlDomainMigratePrepare3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4433:1: error: 'libxlDomainMigratePerform3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4488:1: error: 'libxlDomainMigrateFinish3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4539:1: error: 'libxlDomainMigrateConfirm3Params' defined but not used [-Werror=unused-function] The fixup is obvious (I didn't bother with commit message etc since I expect you'll want to fold it in): commit 69606cdba69afdd5e2eea0096596ae3beaa34890 Author: Ian Campbell <ian.campbell@citrix.com> Date: Wed Jun 25 11:48:45 2014 +0100 fixup diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index f90bf64..03d397e 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -4342,6 +4342,7 @@ libxlNodeDeviceReset(virNodeDevicePtr dev) return ret; } +#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME static char * libxlDomainMigrateBegin3Params(virDomainPtr domain, virTypedParameterPtr params, @@ -4561,7 +4562,7 @@ libxlDomainMigrateConfirm3Params(virDomainPtr domain, return libxlDomainMigrationConfirm(driver, vm, flags, cancelled); } - +#endif /* ifndef LIBXL_HAVE_NO_SUSPEND_RESUME */ static virDriver libxlDriver = { .no = VIR_DRV_LIBXL,

Ian Campbell wrote:
On Tue, 2014-06-24 at 21:18 -0600, Jim Fehlig wrote:
Something like the attached patch (compile-tested only). You'll need an updated libvirt.git master to apply cleanly.
Thanks. Building on ARM I get:
libxl/libxl_driver.c:4346:1: error: 'libxlDomainMigrateBegin3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4384:1: error: 'libxlDomainMigratePrepare3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4433:1: error: 'libxlDomainMigratePerform3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4488:1: error: 'libxlDomainMigrateFinish3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4539:1: error: 'libxlDomainMigrateConfirm3Params' defined but not used [-Werror=unused-function]
Yeah, compile-tested on x86 only as it turned out. I was building packages in the build service, where I had the libxl driver disabled for aarch64 :-/. With the fixup, does this work for you? Is <migration_features> omitted from the capabilities? Regards, Jim
The fixup is obvious (I didn't bother with commit message etc since I expect you'll want to fold it in):
commit 69606cdba69afdd5e2eea0096596ae3beaa34890 Author: Ian Campbell <ian.campbell@citrix.com> Date: Wed Jun 25 11:48:45 2014 +0100
fixup
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index f90bf64..03d397e 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -4342,6 +4342,7 @@ libxlNodeDeviceReset(virNodeDevicePtr dev) return ret; }
+#ifndef LIBXL_HAVE_NO_SUSPEND_RESUME static char * libxlDomainMigrateBegin3Params(virDomainPtr domain, virTypedParameterPtr params, @@ -4561,7 +4562,7 @@ libxlDomainMigrateConfirm3Params(virDomainPtr domain,
return libxlDomainMigrationConfirm(driver, vm, flags, cancelled); } - +#endif /* ifndef LIBXL_HAVE_NO_SUSPEND_RESUME */
static virDriver libxlDriver = { .no = VIR_DRV_LIBXL,

On Wed, 2014-06-25 at 09:25 -0600, Jim Fehlig wrote:
Ian Campbell wrote:
On Tue, 2014-06-24 at 21:18 -0600, Jim Fehlig wrote:
Something like the attached patch (compile-tested only). You'll need an updated libvirt.git master to apply cleanly.
Thanks. Building on ARM I get:
libxl/libxl_driver.c:4346:1: error: 'libxlDomainMigrateBegin3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4384:1: error: 'libxlDomainMigratePrepare3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4433:1: error: 'libxlDomainMigratePerform3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4488:1: error: 'libxlDomainMigrateFinish3Params' defined but not used [-Werror=unused-function] libxl/libxl_driver.c:4539:1: error: 'libxlDomainMigrateConfirm3Params' defined but not used [-Werror=unused-function]
Yeah, compile-tested on x86 only as it turned out. I was building packages in the build service, where I had the libxl driver disabled for aarch64 :-/.
Whoops!
With the fixup, does this work for you? Is <migration_features> omitted from the capabilities?
Yes, it is omitted. On ARM: # virsh capabilities <capabilities> <host> <cpu> <arch>armv7l</arch> </cpu> <power_management/> <topology> <cells num='1'> <cell id='0'> <memory unit='KiB'>4186112</memory> <cpus num='4'> <cpu id='0' socket_id='0' core_id='0' siblings='0-3'/> <cpu id='1' socket_id='0' core_id='0' siblings='0-3'/> <cpu id='2' socket_id='0' core_id='0' siblings='0-3'/> <cpu id='3' socket_id='0' core_id='0' siblings='0-3'/> </cpus> </cell> </cells> </topology> </host> <guest> <os_type>xen</os_type> <arch name='armv7l'> <wordsize>32</wordsize> <emulator>/usr/lib/xen/bin/qemu-dm</emulator> <machine>xenpv</machine> <domain type='xen'> </domain> </arch> </guest> </capabilities> Thanks, Ian.

Ian Campbell wrote:
On Wed, 2014-06-25 at 09:25 -0600, Jim Fehlig wrote:
With the fixup, does this work for you? Is <migration_features> omitted from the capabilities?
Yes, it is omitted. On ARM:
# virsh capabilities <capabilities>
<host> <cpu> <arch>armv7l</arch> </cpu> <power_management/> <topology> <cells num='1'> <cell id='0'> <memory unit='KiB'>4186112</memory> <cpus num='4'> <cpu id='0' socket_id='0' core_id='0' siblings='0-3'/> <cpu id='1' socket_id='0' core_id='0' siblings='0-3'/> <cpu id='2' socket_id='0' core_id='0' siblings='0-3'/> <cpu id='3' socket_id='0' core_id='0' siblings='0-3'/> </cpus> </cell> </cells> </topology> </host>
<guest> <os_type>xen</os_type> <arch name='armv7l'> <wordsize>32</wordsize> <emulator>/usr/lib/xen/bin/qemu-dm</emulator> <machine>xenpv</machine> <domain type='xen'> </domain> </arch> </guest>
</capabilities>
Cool. I've squashed in your changes and sent a "v2" (forgot to note that with --subject-prefix). Regards, Jim
participants (2)
-
Ian Campbell
-
Jim Fehlig