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 <[email protected]> --- Osstest/PDU/ipmi.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } -- 2.20.1
