Message ID | 1403018809-25509-7-git-send-email-ian.campbell@citrix.com |
---|---|
State | New |
Headers | show |
On Tue, 2014-06-17 at 16:26 +0100, Ian Campbell wrote:
> Not implemented for libvirt (the check that is)
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?
Will this capability be automagically suppressed on ARM until we
implement it? FYI xl uses LIBXL_HAVE_NO_SUSPEND_RESUME to figure this
out...
For xl we parse the output of xl help.
Ian.
Ian Campbell wrote: > On Tue, 2014-06-17 at 16:26 +0100, Ian Campbell wrote: > >> Not implemented for libvirt (the check that is) >> > > 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. Regards, Jim
On Mon, 2014-06-23 at 15:28 -0600, Jim Fehlig wrote: > Ian Campbell wrote: > > On Tue, 2014-06-17 at 16:26 +0100, Ian Campbell wrote: > > > >> Not implemented for libvirt (the check that is) > >> > > > > 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. Great, thanks. If my patches to enable osstest virsh support (they need a bit of work anyway) were to go in before this then ts-migration-check test case will turn from pass to fail which will look like a regression (even though ts-migrate which it gates was failing). That's not the end of the world and we could force osstest to ignore the old spurious passes. Ian.
diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index c1d2b09..2dffd09 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -50,4 +50,9 @@ sub create ($$) { target_cmd_root($ho, "virsh create --file $cfg.xml", 100); } +sub migrate_check ($) { + my ($self) = @_; + die "libvirt migration not supported yet." +} + 1; diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index 4f093bc..934f1a5 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -36,4 +36,9 @@ sub new { sub destroy { return Osstest::Toolstack::xl::destroy(@_); } sub create { return Osstest::Toolstack::xl::create(@_); } +sub migrate_check ($) { + my ($self) = @_; + return 0; +} + 1; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index ca46094..1c97a9d 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -42,4 +42,13 @@ sub create ($$) { target_cmd_root($self->{Host}, $self->{_Command}." create $cfg", 100); } +sub migrate_check ($) { + my $self = @_; + my $ho = $self->{Host}; + my $help = target_cmd_output_root($ho, $self->{_Command}." help"); + my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1; + logm("rc=$rc"); + return $rc; +} + 1; diff --git a/ts-migrate-support-check b/ts-migrate-support-check index c70b77a..cd41f68 100755 --- a/ts-migrate-support-check +++ b/ts-migrate-support-check @@ -24,12 +24,4 @@ tsreadconfig(); our $ho = selecthost($ARGV[0]); -# all xend/xm platforms support migration -exit(0) if toolstack($ho)->{Command} eq "xm"; - -my $help = target_cmd_output_root($ho, toolstack($ho)->{Command}." help"); - -my $rc = ($help =~ m/^\s*migrate/m) ? 0 : 1; - -logm("rc=$rc"); -exit($rc); +exit(toolstack($ho)->migrate_check());
Not implemented for libvirt (the check that is) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- Osstest/Toolstack/libvirt.pm | 5 +++++ Osstest/Toolstack/xend.pm | 5 +++++ Osstest/Toolstack/xl.pm | 9 +++++++++ ts-migrate-support-check | 10 +--------- 4 files changed, 20 insertions(+), 9 deletions(-)