summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiangfei Zhu <xiangfeiz@vmware.com>2015-08-21 16:59:19 +0800
committerXiangfei Zhu <xiangfeiz@vmware.com>2015-08-21 17:09:25 +0800
commit7a3e77f98bd1b1d8f42239011c6219bf9b46c5ea (patch)
treeba9b84c9fbf60b288ce5fb933b62d5ec1540ac6f
parent61b7ffcaf84dac5be16acbda2878d2d7811507f1 (diff)
downloadtempest-lib-7a3e77f98bd1b1d8f42239011c6219bf9b46c5ea.tar.gz
Retry ssh connect when EOFError received
When doing a ssh connect, paramiko transport randomly throws out EOFError. This should be retried the same as when socket.error and paramiko.SSHException are captured. Change-Id: Iaf6dce01278116128dcef8f11585e8d7f6353e1e Closes-bug: #1487373
-rw-r--r--tempest_lib/common/ssh.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tempest_lib/common/ssh.py b/tempest_lib/common/ssh.py
index 1911f9e..1dab6c9 100644
--- a/tempest_lib/common/ssh.py
+++ b/tempest_lib/common/ssh.py
@@ -76,7 +76,8 @@ class Client(object):
LOG.info("ssh connection to %s@%s successfuly created",
self.username, self.host)
return ssh
- except (socket.error,
+ except (EOFError,
+ socket.error,
paramiko.SSHException) as e:
if self._is_timed_out(_start_time):
LOG.exception("Failed to establish authenticated ssh"