From 100e9056edf30fea5c938988fcfdfa020e52fe61 Mon Sep 17 00:00:00 2001 From: Sam Lang Date: Tue, 5 Feb 2013 16:20:52 -0600 Subject: [PATCH] misc: Close connections on reboot 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 --- teuthology/misc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/teuthology/misc.py b/teuthology/misc.py index b979b90ee3f2b..bb95550f8c48d 100644 --- a/teuthology/misc.py +++ b/teuthology/misc.py @@ -515,6 +515,10 @@ def reconnect(ctx, timeout): """ 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: -- 2.39.5