else:
subprocess.check_call(["kill", "-9", str(ctx.pid)])
- nuke(ctx, ctx.unlock, ctx.synch_clocks, ctx.noipmi, ctx.keep_logs)
+ nuke(ctx, ctx.unlock, ctx.synch_clocks, ctx.noipmi, ctx.keep_logs, not ctx.no_reboot)
-def nuke(ctx, should_unlock, sync_clocks=True, noipmi=False, keep_logs=False):
+def nuke(ctx, should_unlock, sync_clocks=True, noipmi=False, keep_logs=False, should_reboot=True):
if 'targets' not in ctx.config:
return
total_unnuked = {}
ctx.config.get('check-locks', True),
noipmi,
keep_logs,
+ should_reboot,
)
for unnuked in p:
if unnuked:
def nuke_one(ctx, target, should_unlock, synch_clocks,
- check_locks, noipmi, keep_logs):
+ check_locks, noipmi, keep_logs, should_reboot):
ret = None
- should_reboot = not ctx.no_reboot
ctx = argparse.Namespace(
config=dict(targets=target),
owner=ctx.owner,