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>
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'
],