Skip to content

Commit 62e8841

Browse files
committed
fix
1 parent e26dd09 commit 62e8841

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

dags/tpu_observability/jobset_ttr_pod_oom.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,10 @@ def trigger_oom_failure(info, pod_name: str, namespace: str):
9696
try:
9797
print(f"Blasting {pod_name} memory now...")
9898
subprocess.run_exec(full_command, env=env)
99+
except subprocess.ProcessKilledException:
100+
print(f"Success: Pod {pod_name} was OOMKilled.")
99101
except Exception as e:
100-
if "137" in str(e):
101-
print(f"Success: Pod {pod_name} was OOMKilled (Exit Code 137).")
102-
else:
103-
print(f"Connection lost (Possible OOM): {e}")
102+
print(f"Connection lost or other error: {e}")
104103

105104

106105
@task

0 commit comments

Comments
 (0)