]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
kill.kill_job: Get job data from paddles 1980/head
authorZack Cerza <zack@redhat.com>
Fri, 19 Jul 2024 19:32:03 +0000 (13:32 -0600)
committerZack Cerza <zack@redhat.com>
Fri, 19 Jul 2024 19:37:47 +0000 (13:37 -0600)
... if we can't get it from the filesystem. This is necessary because of the
teuthology archive's restricted permissions on teuthology.front.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/kill.py

index 8a629f1cde149aac890711e7a0fffe43313db3fb..720096a2671231ac063024c6adf7df13f292a636 100755 (executable)
@@ -82,6 +82,9 @@ def kill_run(run_name, archive_base=None, owner=None, machine_type=None,
 def kill_job(run_name, job_id, archive_base=None, owner=None, skip_unlock=False):
     serializer = report.ResultsSerializer(archive_base)
     job_info = serializer.job_info(run_name, job_id)
+    # If we can't read the filesystem, job_info will be nearly empty. Ask paddles:
+    if 'name' not in job_info:
+        job_info = report.ResultsReporter().get_jobs(run_name, job_id)
     if not owner:
         if 'owner' not in job_info:
             raise RuntimeError(