From 306d921bc64560a009747173f57924ac42e86870 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 19 Mar 2021 21:01:20 +0000 Subject: [PATCH] nuke: don't power-off machines when not rebooting This ensures jobs that time out can still have their logs gathered. Signed-off-by: Josh Durgin --- teuthology/nuke/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/teuthology/nuke/__init__.py b/teuthology/nuke/__init__.py index 301194215b..fc25ccd38c 100644 --- a/teuthology/nuke/__init__.py +++ b/teuthology/nuke/__init__.py @@ -314,13 +314,14 @@ def nuke_helper(ctx, should_unlock, keep_logs, should_reboot): # we want to be able to nuke a downed node check_lock.check_lock(ctx, None, check_up=False) status = get_status(host) - if status['machine_type'] in provision.fog.get_types(): - remote = Remote(host) - remote.console.power_off() - return - elif status['machine_type'] in provision.pelagos.get_types(): - provision.pelagos.park_node(host) - return + if should_reboot: + if status['machine_type'] in provision.fog.get_types(): + remote = Remote(host) + remote.console.power_off() + return + elif status['machine_type'] in provision.pelagos.get_types(): + provision.pelagos.park_node(host) + return if (not ctx.noipmi and 'ipmi_user' in config and 'vpm' not in shortname): -- 2.39.5