Fix exceptions catched during check_overcloud_node_uptime
The sh.get_uptime function only raises the exception UptimeError. Change-Id: Ic6386add86ae7723cd12f95c529ea60f1761e928
This commit is contained in:
parent
9c247d565d
commit
cfbf0ddb27
|
@ -127,6 +127,7 @@ wait_for_active_systemd_units = _systemctl.wait_for_active_systemd_units
|
|||
wait_for_systemd_units_state = _systemctl.wait_for_systemd_units_state
|
||||
|
||||
get_uptime = _uptime.get_uptime
|
||||
UptimeError = _uptime.UptimeError
|
||||
|
||||
assert_file_size = _wc.assert_file_size
|
||||
get_file_size = _wc.get_file_size
|
||||
|
|
|
@ -130,9 +130,8 @@ def check_overcloud_node_uptime(ssh_client, start_time):
|
|||
for attempt in tobiko.retry(timeout=600., interval=10.):
|
||||
try:
|
||||
uptime = sh.get_uptime(ssh_client=ssh_client, timeout=15.)
|
||||
except (sh.ShellCommandFailed,
|
||||
sh.ShellTimeoutExpired,
|
||||
sh.ShellProcessTerminated):
|
||||
except sh.UptimeError:
|
||||
LOG.exception('uptime command failed')
|
||||
uptime = None
|
||||
|
||||
if uptime and uptime < (tobiko.time() - start_time):
|
||||
|
|
Loading…
Reference in New Issue