When nodes are rebooted, the connections remain open
even after calling reconnect and setting up new ssh
sessions to the rebooted nodes. This causes ECONNRESET
errors to show up in the teuthology output.
Close the existing connections before trying to reconnect.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
"""
log.info('Re-opening connections...')
starttime = time.time()
+
+ for r in ctx.cluster.remotes.iterkeys():
+ r.ssh.close()
+
need_reconnect = ctx.cluster.remotes.keys()
while need_reconnect:
for remote in need_reconnect: