[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST] Toolstack::xl: Support for ACPI fallback for shutdown



On Tue, 2015-05-12 at 14:36 -0600, Jim Fehlig wrote:
> > Ian.
> >
> > From f560b7eed781a93567d69bcf90260c7475854766 Mon Sep 17 00:00:00 2001
> > From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > Date: Thu, 7 May 2015 16:37:18 +0100
> > Subject: [PATCH] Toolstack::libvirt: Support for ACPI fallback for shutdown
> >
> > This is the libvirt counterpart to "Toolstack::xl: Support for ACPI
> > fallback for shutdown". Currently there are no jobs which test HVM
> > guests with libvirt and so this is completely untested (but at least
> > should be harmless to current jobs).
> >
> > This relies on an assumption that "virsh shutdown" behaves the same as
> > "virsh reboot" and accepts a comma separated list of methods to try
> > given to the --mode argument.
> >   
> 
> That assumption would be correct, and I just verified it is working as
> expected.

Thanks. I updated the commit message to reflect this feedback. Can I add
your ack to?

From 682b446b1ee30e6b26b7138805bdd0ca89d1942d Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 7 May 2015 16:37:18 +0100
Subject: [PATCH] Toolstack::libvirt: Support for ACPI fallback for shutdown

This is the libvirt counterpart to "Toolstack::xl: Support for ACPI
fallback for shutdown". Currently there are no jobs which test HVM
guests with libvirt and so this is completely untested in the context
of osstest (but at least should be harmless to current jobs).

This relies on an assumption that "virsh shutdown" behaves the same as
"virsh reboot" and accepts a comma separated list of methods to try
given to the --mode argument, which Jim has tested and confirmed to be
true.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Jim Fehlig <jfehlig@xxxxxxxx>
---
 Osstest/Toolstack/libvirt.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm
index 8bd7f4f..e7f4860 100644
--- a/Osstest/Toolstack/libvirt.pm
+++ b/Osstest/Toolstack/libvirt.pm
@@ -60,7 +60,11 @@ sub shutdown_wait ($$$) {
     my ($self,$gho,$timeout) = @_;
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
-    target_cmd_root($ho, "virsh shutdown $gn", 30);
+    my $mode = "paravirt";
+    $mode .= ",acpi"
+       if guest_var($gho,'acpi_shutdown','false') eq 'true';
+
+    target_cmd_root($ho, "virsh shutdown --mode $mode $gn", 30);
     guest_await_destroy($gho,$timeout);
 }
 
-- 
2.1.4




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.