From: Zack Cerza Date: Mon, 3 Feb 2025 21:17:32 +0000 (-0700) Subject: node_active_job: Improve http error handling X-Git-Tag: 1.2.2~37^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2025%2Fhead;p=teuthology.git node_active_job: Improve http error handling Signed-off-by: Zack Cerza --- diff --git a/teuthology/lock/query.py b/teuthology/lock/query.py index 752eac106..d52149a21 100644 --- a/teuthology/lock/query.py +++ b/teuthology/lock/query.py @@ -160,5 +160,9 @@ def node_active_job(name: str, status: Union[dict, None] = None) -> Union[str, N if resp.ok: job_status = resp.json()["status"] break + elif resp.status_code == 404: + break + else: + log.debug(f"Error {resp.status_code} listing job {run_name}/{job_id} for {name}: {resp.text}") if job_status and job_status not in ('pass', 'fail', 'dead'): return description