diff mbox series

[OSSTEST,03/16] PDU/IPMI: Retransmit, don't just wait

Message ID 20201022164506.1552-4-iwj@xenproject.org (mailing list archive)
State New, archived
Headers show
Series Bugfixes | expand

Commit Message

Ian Jackson Oct. 22, 2020, 4:44 p.m. UTC
We have a system for which
   ipmitool -H sabro0m -U root -P XXXX -I lanplus power on
seems to work but doesn't take effect the first time.

Retransit each retry.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 Osstest/PDU/ipmi.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Osstest/PDU/ipmi.pm b/Osstest/PDU/ipmi.pm
index 98e8957f..21c94d98 100644
--- a/Osstest/PDU/ipmi.pm
+++ b/Osstest/PDU/ipmi.pm
@@ -66,11 +66,12 @@  sub pdu_power_state {
 	return;
     }
 
-    system_checked((@cmd, qw(power), $onoff));
-
     my $count = 60;
     for (;;) {
         last if $getstatus->() eq $onoff;
+
+	system_checked((@cmd, qw(power), $onoff));
+
         die "did not power $onoff" unless --$count > 0;
         sleep(1);
     }