When we `power on' with the ssh method, we actually run ssh reboot.
On some systems (notably, FreeBSD) the kernel does not simply reboot
immediately even with the runes we provide here, ie for FreeBSD
reboot -nq
Eg, I have seen reboots with several messages like this:
Jan 25 14:17:59.100044 Waiting (max 60 seconds) for system thread `bufspacedaemon-2' to stop... done
This can result in the ssh method failing spuriously, because the
`power on' appears to complete while the host is still up in the
previous environment. In one of my test runs I saw an ssh to the host
succeed, and print the uptime (of the existing environment), between
the reboot command being issued and the host actually rebooting.
So, wait (up to just over a minute) until the host does not respond to
ping. (target_await_down runs ping -c 5.)
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
)&
END
- sleep($delay);
+ target_await_down($mo->{Host}, $delay + 70);
}
sub instantaneous {