From: Ian Jackson Date: Tue, 22 Jan 2019 14:44:57 +0000 (+0000) Subject: power: Try rebooting hosts with ssh first X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=0b36e74ca18e1500989e161c656b703dc63a982a;p=people%2Fiwj%2Fosstest.git power: Try rebooting hosts with ssh first Before we try anything with IPMI (if provided) or the PDU, try rebooting with ssh. I think this will dramatically reduce the rate at which we power cycle our test hosts. Signed-off-by: Ian Jackson --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index c3b2fb7b..8101b739 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -992,8 +992,12 @@ sub power_reboot_attempts ($$$) { # to work. $setup and $await should tolerate this situation; in # particular $await must only succeed if the host really did reboot # into the boot environment that $await expects. - foreach my $approach (@{ $ho->{PowerApproaches} }) { - logm("power: rebooting $ho->{Name} (using $approach->{Name})"); + my $ssh = { + Name => 'SSH', + MethObjs => power_cycle_parse_method($ho, 'ssh'), + }; + foreach my $approach ($ssh, @{ $ho->{PowerApproaches} }) { + logm("power: trying to reboot $ho->{Name} (using $approach->{Name})"); if (eval { power_approach_invoke($ho, $approach, 0); $setup->();