]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kernel: install in parallel
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 5 Aug 2011 18:17:28 +0000 (11:17 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 5 Aug 2011 18:17:28 +0000 (11:17 -0700)
teuthology/task/kernel.py

index 12c29b2f69e578d5f9275c70f92d05a408045759..0322699cff79fe2cd1ab10163d280cbbd649aa78 100644 (file)
@@ -95,13 +95,14 @@ def need_to_install(ctx, role, sha1):
     return ret
 
 def install_and_reboot(ctx, config):
+    procs = {}
     for role, sha1 in config.iteritems():
         log.info('Installing kernel version {sha1} on {role}...'.format(sha1=sha1,
                                                                         role=role))
         (role_remote,) = ctx.cluster.only(role).remotes.keys()
         _, deb_url = teuthology.get_ceph_binary_url(sha1=sha1, flavor='kernel')
         log.info('fetching kernel from {url}'.format(url=deb_url))
-        role_remote.run(
+        proc = role_remote.run(
             args=[
                 'echo',
                 'linux-image.deb',
@@ -126,7 +127,14 @@ def install_and_reboot(ctx, config):
                 '-r',
                 'now',
                 ],
+            wait=False,
             )
+        procs[role_remote.name] = proc
+
+    for name, proc in procs.iteritems():
+        log.debug('Waiting for install on %s to complete...', name)
+        proc.exitstatus.get()
+
 
 def reconnect(ctx, timeout):
     log.info('Re-opening connections...')