From: Sage Weil Date: Sat, 7 Dec 2013 01:42:23 +0000 (-0800) Subject: nuke: fix sync before reboot timeout X-Git-Tag: 1.1.0~1759 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c0a43275134a01b8b82ad427ef3e4d7e452f131f;p=teuthology.git nuke: fix sync before reboot timeout 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 --- diff --git a/teuthology/nuke.py b/teuthology/nuke.py index 8ec0c931..11089d6a 100644 --- a/teuthology/nuke.py +++ b/teuthology/nuke.py @@ -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' ],