Merge "Do not fail if no unreplied pings are found after reboot"
This commit is contained in:
commit
7455a39f79
@ -55,8 +55,15 @@ def reboot_host(ssh_client: ssh.SSHClientFixture,
|
|||||||
method=method)
|
method=method)
|
||||||
tobiko.setup_fixture(reboot)
|
tobiko.setup_fixture(reboot)
|
||||||
if wait:
|
if wait:
|
||||||
# when pings are not replied, we consider the reboot operation started
|
try:
|
||||||
ping.wait_for_ping_hosts([ssh_client.host], check_unreachable=True)
|
# when pings are not replied, the reboot operation starts
|
||||||
|
# in some cases the reboot is fast enough and no pings are
|
||||||
|
# unreplied - do not fail in such a case and check uptime instead
|
||||||
|
ping.wait_for_ping_hosts([ssh_client.host],
|
||||||
|
check_unreachable=True,
|
||||||
|
retry_timeout=30.)
|
||||||
|
except ping.ReachableHostsException:
|
||||||
|
LOG.exception("no unreplied pings were found - let's check uptime")
|
||||||
reboot.wait_for_operation()
|
reboot.wait_for_operation()
|
||||||
return reboot
|
return reboot
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user