From: Ilya Dryomov Date: Fri, 3 Feb 2017 10:21:02 +0000 (+0100) Subject: nuke: work around a reboot -n trouble X-Git-Tag: 1.1.0~468^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1024%2Fhead;p=teuthology.git nuke: work around a reboot -n trouble Signed-off-by: Ilya Dryomov --- diff --git a/teuthology/nuke/actions.py b/teuthology/nuke/actions.py index c3eee973b..56a086666 100644 --- a/teuthology/nuke/actions.py +++ b/teuthology/nuke/actions.py @@ -152,9 +152,16 @@ def reboot(ctx, remotes): if stale_kernel_mount(remote): log.warn('Stale kernel mount on %s!', remote.name) log.info('force/no-sync rebooting %s', remote.name) - args = ['sync', run.Raw('&'), - 'sleep', '5', run.Raw(';'), - 'sudo', 'reboot', '-f', '-n'] + # -n is ignored in systemd versions through v229, which means this + # only works on trusty -- on 7.3 (v219) and xenial (v229) reboot -n + # still calls sync(). + # args = ['sync', run.Raw('&'), + # 'sleep', '5', run.Raw(';'), + # 'sudo', 'reboot', '-f', '-n'] + args = ['for', 'sysrq', 'in', 's', 'u', 'b', run.Raw(';'), + 'do', 'echo', run.Raw('$sysrq'), run.Raw('|'), + 'sudo', 'tee', '/proc/sysrq-trigger', run.Raw(';'), + 'done'] else: log.info('rebooting %s', remote.name) args = ['sudo', 'reboot']