]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/ceph_manager: Only reconnect if powercycled
authorSam Lang <sam.lang@inktank.com>
Wed, 13 Mar 2013 16:05:45 +0000 (11:05 -0500)
committerSam Lang <sam.lang@inktank.com>
Wed, 13 Mar 2013 16:15:51 +0000 (11:15 -0500)
We don't need to reconnect for remotes
that haven't been powercycled.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
teuthology/misc.py
teuthology/task/ceph_manager.py

index bbd2b5e34e2be6bdaba6dc1909d365f5a23897f8..1fdeadf4aa5aa015f8c56c689213a1c80e5798a8 100644 (file)
@@ -508,7 +508,7 @@ def wait_until_fuse_mounted(remote, fuse, mountpoint):
         time.sleep(5)
     log.info('ceph-fuse is mounted on %s', mountpoint)
 
-def reconnect(ctx, timeout):
+def reconnect(ctx, timeout, remotes=None):
     """
     Connect to all the machines in ctx.cluster.
 
@@ -525,10 +525,14 @@ def reconnect(ctx, timeout):
     log.info('Re-opening connections...')
     starttime = time.time()
 
-    for r in ctx.cluster.remotes.iterkeys():
+    if remotes:
+        need_reconnect = remotes
+    else:
+        need_reconnect = ctx.cluster.remotes.keys()
+
+    for r in need_reconnect:
         r.ssh.close()
 
-    need_reconnect = ctx.cluster.remotes.keys()
     while need_reconnect:
         for remote in need_reconnect:
             try:
index 07de26ca5fdbad357e9fab977d69d5813ae9a576..a2d421995a82d6616d03502fc2366111849f3ace 100644 (file)
@@ -684,7 +684,7 @@ class CephManager:
             remote.console.power_on()
             if not remote.console.check_status(300):
                 raise Exception('Failed to revive osd.{o} via ipmi'.format(o=osd))
-            teuthology.reconnect(self.ctx, 60)
+            teuthology.reconnect(self.ctx, 60, [remote])
             ceph_task.mount_osd_data(self.ctx, remote, osd)
             ceph_task.make_admin_daemon_dir(self.ctx, remote)
             self.ctx.daemons.get_daemon('osd', osd).reset()