]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Keep each ssh connection alive.
authorJosh Durgin <josh.durgin@dreamhost.com>
Thu, 3 Nov 2011 20:08:39 +0000 (13:08 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 3 Nov 2011 20:08:49 +0000 (13:08 -0700)
With long-running jobs like thrashing, ssh connections were timing
out.

teuthology/misc.py
teuthology/task/internal.py

index cf090f529a72869defeb7b897c8224eeb250ae2f..7ff1b9865507bad1aed38b215d5cb39c9517ef5b 100644 (file)
@@ -331,6 +331,7 @@ def reconnect(ctx, timeout):
                 remote.ssh = connection.connect(
                     user_at_host=remote.name,
                     host_key=ctx.config['targets'][remote.name],
+                    keep_alive=True,
                     )
             except socket.timeout:
                 pass
index 0f2855c430252cf6d211c5fe78b3ad12027bfaf8..a7df647503cab6a6e0499cdaca36584b6ebbb751 100644 (file)
@@ -120,7 +120,9 @@ def connect(ctx, config):
         log.debug('connecting to %s', t)
         remotes.append(
             remote.Remote(name=t,
-                          ssh=connection.connect(user_at_host=t, host_key=key)))
+                          ssh=connection.connect(user_at_host=t,
+                                                 host_key=key,
+                                                 keep_alive=True)))
     ctx.cluster = orchestra.cluster.Cluster()
     if 'roles' in ctx.config:
         for rem, roles in zip(remotes, ctx.config['roles']):