]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
nuke: don't power-off machines when not rebooting 1631/head
authorJosh Durgin <jdurgin@redhat.com>
Fri, 19 Mar 2021 21:01:20 +0000 (21:01 +0000)
committerJosh Durgin <jdurgin@redhat.com>
Fri, 19 Mar 2021 21:01:20 +0000 (21:01 +0000)
This ensures jobs that time out can still have their logs gathered.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
teuthology/nuke/__init__.py

index 301194215b77ad336091efe60baec69b62a8bb87..fc25ccd38cbb94057f6a7291a43db0667a242887 100644 (file)
@@ -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):