]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
ts-logs-capture: power: try ILOM first
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 22 Jan 2019 18:00:50 +0000 (18:00 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 24 Jan 2019 18:40:21 +0000 (18:40 +0000)
If ILOM is provided, and the host is not responding when we try logs
capture, try the ILOM before hard power cycling the host.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm

index 4e1192d4bf5f6ad7885e5c506a4403da0a9187ea..886e95d4a39923cf4111e0750fa6a8e459b6307e 100644 (file)
@@ -1440,8 +1440,9 @@ sub target_reboot ($) {
 
 sub target_reboot_force ($) {
     my ($ho) = @_;
-    power_cycle($ho);
-    await_tcp(get_timeout($ho,'reboot',$timeout{HardRebootUp}), 5, $ho);
+    power_reboot_attempts($ho, sub { }, sub {
+        await_tcp(get_timeout($ho,'reboot',$timeout{HardRebootUp}), 5, $ho);
+    }, qr{(?!.*SSH)});
 }
 
 sub tcpconnect ($$) {