Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandaharvester/commit_timestamp.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
timestamp = "12-10-2026 12:30:24 on flin (by mightqxc)"
timestamp = "23-10-2026 22:39:28 on flin (by mightqxc)"
5 changes: 4 additions & 1 deletion pandaharvester/harvestercore/worker_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
6814: r"Pod was rejected: .*",
6815: r"Pod was active on the node longer than the specified deadline",
6819: r"Pod was .*",
# 6.8.5 Payload errors
6850: r"payload returned non-zero exit code .*",
# 6.8.8 Harvester K8s plugin reserved errors
6881: r"Failed to get status for id=.*",
6882: r"JOB id=.* not found",
Expand Down Expand Up @@ -199,6 +201,7 @@ class WorkerErrors(object):
"SUCCEEDED": 0,
"UNKNOWN": 1000,
"PREEMPTED": 1001,
"K8S_PAYLOAD_NONZERO": 6850,
"GENERAL_ERROR": 9000,
}

Expand All @@ -208,4 +211,4 @@ class WorkerErrors(object):
)

# Kubernetes plugin worker error message patterns
k8s_message_pattern_handler = ErrorMessagePatternHandler(CMPM_Kubernetes | CMPM_Catchall)
k8s_message_pattern_handler = ErrorMessagePatternHandler(CMPM_Pilot_Wrapper | CMPM_Kubernetes | CMPM_Catchall)
15 changes: 12 additions & 3 deletions pandaharvester/harvestermonitor/k8s_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,18 @@ def check_a_worker(self, workspec):
deleted_pods_list.append(item["name"])
tmp_log.debug(f"Deleted pods queuing too long: {','.join(deleted_pods_list)}")

# If there was an exit code and we have predefined message from e.g. the pilot wrapper
# If there was an exit code, map known payload (e.g. pilot wrapper) errors by pattern, otherwise use the k8s payload catch-all code
sup_error_diag = ""
if exit_code != 0:
sup_error_code = exit_code
sup_error_diag += get_payload_errstr_from_ec(self.payloadType, exit_code)
payload_errstr = get_payload_errstr_from_ec(self.payloadType, exit_code)
if payload_errstr:
sup_error_code = WorkerErrors.k8s_message_pattern_handler.get_error_code(payload_errstr)
if sup_error_code is None:
sup_error_code = WorkerErrors.error_codes.get("GENERAL_ERROR")
sup_error_diag = payload_errstr
else:
sup_error_code = WorkerErrors.error_codes.get("K8S_PAYLOAD_NONZERO")
sup_error_diag = f"payload returned non-zero exit code {exit_code}"
else:
if error_message:
sup_error_code = WorkerErrors.k8s_message_pattern_handler.get_error_code(error_message)
Expand All @@ -243,6 +250,8 @@ def check_a_worker(self, workspec):
sup_error_code = WorkerErrors.error_codes.get("SUCCEEDED")

# Extend the base error message with the information found querying the job and pods
if sup_error_diag and error_message:
sup_error_diag += ";"
sup_error_diag += error_message

tmp_log.debug(f"setting sup_error_code={sup_error_code}, sup_error_diag={sup_error_diag}")
Expand Down
Loading