From 7a3e77f98bd1b1d8f42239011c6219bf9b46c5ea Mon Sep 17 00:00:00 2001 From: Xiangfei Zhu Date: Fri, 21 Aug 2015 16:59:19 +0800 Subject: [PATCH] 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 --- tempest_lib/common/ssh.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"