From: Sam Lang Date: Tue, 5 Feb 2013 22:20:52 +0000 (-0600) Subject: misc: Close connections on reboot X-Git-Tag: v0.94.10~27^2^2~364^2~1033^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=100e9056edf30fea5c938988fcfdfa020e52fe61;p=ceph.git 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 --- diff --git a/teuthology/misc.py b/teuthology/misc.py index b979b90ee3f2..bb95550f8c48 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: