]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kernel: ignore connection problems while waiting for reboot
authorJosh Durgin <josh.durgin@dreamhost.com>
Tue, 17 Jan 2012 23:35:19 +0000 (15:35 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 19 Jan 2012 01:49:05 +0000 (17:49 -0800)
teuthology/task/kernel.py

index b3a8574aa7a5af5b4688e14995c51bfc8dd8727d..c499502258f46d87299e2c56f62f44be31373a94 100644 (file)
@@ -187,11 +187,14 @@ def wait_for_reboot(ctx, need_install, timeout):
         teuthology.reconnect(ctx, timeout)
         for client in need_install.keys():
             log.info('Checking client {client} for new kernel version...'.format(client=client))
-            if need_to_install(ctx, client, need_install[client]):
-                assert time.time() - starttime < timeout, \
-                    'failed to install new kernel version within timeout'
-            else:
+            try:
+                assert not need_to_install(ctx, client, need_install[client]), \
+                        'failed to install new kernel version within timeout'
                 del need_install[client]
+            except:
+                # ignore connection resets and asserts while time is left
+                if time.time() - starttime > timeout:
+                    raise
         time.sleep(1)
 
 def task(ctx, config):