]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
kill: let pids be None when call kill_process
authorKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Wed, 11 Feb 2026 13:26:09 +0000 (14:26 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Wed, 11 Feb 2026 13:26:09 +0000 (14:26 +0100)
If we run teuthology-kill with -j option it may not know
about job pid, let it pass None as pids argument for
kill_process so it can figure it out on its own.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
teuthology/kill.py

index 08abe0db4cafee1a586b81c74620213d2dd7f92d..1ac6050e5d44c9248f57117f85dc78a1c3bd8ec7 100755 (executable)
@@ -78,7 +78,9 @@ def kill_job(run_name, job_id, owner=None, skip_unlock=False):
                 "I could not figure out the owner of the requested job. "
                 "Please pass --owner <owner>.")
         owner = job_info['owner']
-    if kill_processes(run_name, [int(job_info.get('pid'))], job_info.get('job_id')):
+    pid = job_info.get('pid')
+    pids = pid and [int(pid)]
+    if kill_processes(run_name, pids, job_info.get('job_id')):
         return
     report.try_push_job_info(
         {