Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/tacacs/test_ro_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import time

from ansible.errors import AnsibleConnectionFailure
from tests.common.devices.base import RunAnsibleModuleFail
from tests.common.utilities import wait_until
from tests.common.utilities import skip_release
Expand Down Expand Up @@ -67,10 +68,15 @@ def do_reboot(duthost, localhost, duthosts):
localhost.wait_for(host=duthost.mgmt_ip, port=22, state="stopped", delay=5, timeout=60)
rebooted = True
break
except AnsibleConnectionFailure as e:
logger.error("DUT not reachable, exception: {} attempt:{}/{}".
format(repr(e), i, retries))
except RunAnsibleModuleFail as e:
logger.error("DUT did not go down, exception: {} attempt:{}/{}".
format(repr(e), i, retries))

wait(wait_time, msg="Wait {} seconds before retry.".format(wait_time))

assert rebooted, "Failed to reboot"
localhost.wait_for(host=duthost.mgmt_ip, port=22, state="started", delay=10, timeout=300)
wait(wait_time, msg="Wait {} seconds for system to be stable.".format(wait_time))
Expand Down