From 0f8fc296bc587c8587c01a700cdaf1c83f3d601a Mon Sep 17 00:00:00 2001 From: Georgios Kyratsas Date: Mon, 27 Apr 2020 13:58:54 +0200 Subject: [PATCH] tasks/util: add exception on remote_exec Adding currently unhandled NoValidConnectionsError exception Signed-off-by: Georgios Kyratsas --- qa/tasks/util/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qa/tasks/util/__init__.py b/qa/tasks/util/__init__.py index 5815553989174..7038f17d50bdd 100644 --- a/qa/tasks/util/__init__.py +++ b/qa/tasks/util/__init__.py @@ -7,7 +7,7 @@ from teuthology.exceptions import ( ConfigError, ConnectionLostError, ) - +from paramiko.ssh_exception import NoValidConnectionsError def enumerate_osds(remote, logger): """ @@ -236,7 +236,7 @@ def remote_exec(remote, cmd_str, logger, log_spec, quiet=True, rerun=False, trie "output of \"journalctl --all\"!").format(log_spec)) remote.sh("sudo su -c 'journalctl --all > /var/log/journalctl.log'") raise - except ConnectionLostError: + except (ConnectionLostError, NoValidConnectionsError): already_rebooted_at_least_once = True if tries < 1: raise -- 2.39.5