]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke: fix sync before reboot timeout
authorSage Weil <sage@inktank.com>
Sat, 7 Dec 2013 01:42:23 +0000 (17:42 -0800)
committerSage Weil <sage@inktank.com>
Sat, 7 Dec 2013 01:42:23 +0000 (17:42 -0800)
If you do 'timeout 5 sync' and sync hangs, timeout will block trying to
kill it.

Instead, just background sync, wait a few seconds, and reboot.  This means
we wait a few seconds even if sync returns immediately, but who cares!

Signed-off-by: Sage Weil <sage@inktank.com>
teuthology/nuke.py

index 8ec0c931ddf1b4647f43965bcaf3656b678f1ffd..11089d6a4be5453416603218795f05fe90865489 100644 (file)
@@ -150,7 +150,9 @@ def reboot(ctx, remotes):
         log.info('rebooting %s', remote.name)
         proc = remote.run(  # note use of -n to force a no-sync reboot
             args=[
-                'timeout', '5', 'sync',
+                'sync',
+                run.Raw('&'),
+                'sleep', '5',
                 run.Raw(';'),
                 'sudo', 'reboot', '-f', '-n'
             ],