From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: Re: [PATCH OSSTEST] Toolstack::xl: Support for ACPI fallback for shutdown Date: Tue, 12 May 2015 14:36:01 -0600 Message-ID: <55526431.2040508@suse.com> References: <1430989624-21654-1-git-send-email-ian.campbell@citrix.com> <1430993516.2660.358.camel@citrix.com> <21842.5722.119507.912307@mariner.uk.xensource.com> <1431443983.8263.179.camel@citrix.com> <1431444852.8263.181.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431444852.8263.181.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Ian Jackson , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Ian Campbell wrote: > On Tue, 2015-05-12 at 16:19 +0100, Ian Campbell wrote: > >> On Tue, 2015-05-12 at 16:03 +0100, Ian Jackson wrote: >> >>> Ian Campbell writes ("Re: [PATCH OSSTEST] Toolstack::xl: Support for ACPI fallback for shutdown"): >>> >>>> If that were the case then I think the below would do the trick, but as >>>> I say I don't have an immediately convenient way to test, nor a need >>>> since there are no such tests right now. >>>> >>> This patch looks plausible. Subject to comments from Jim I would be >>> tempted to throw it into osstest alongside the patch to do the same to >>> xl, with appropriate caveats in the commit message. >>> >> Shall I fold it into the xl one, or do it separately? >> > > You acked the xl one, so here is a separate one. > > Jim, does this look at all plausible to you? > Yes, looks good. > Ian. > > From f560b7eed781a93567d69bcf90260c7475854766 Mon Sep 17 00:00:00 2001 > From: Ian Campbell > 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. Regards, Jim > Signed-off-by: Ian Campbell > Cc: Jim Fehlig > --- > 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); > } > >