Skip to content

Commit

Permalink
Include fatal reason for pod pending events (#39924)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfier authored Jun 7, 2024
1 parent 0e8d823 commit 00a2843
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ def process_status(
self.kube_config.worker_pod_pending_fatal_container_state_reasons
and "status" in event["raw_object"]
):
self.log.info("Event: %s Pending, annotations: %s", pod_name, annotations_string)
# Init containers and base container statuses to check.
# Skipping the other containers statuses check.
container_statuses_to_check = []
Expand All @@ -250,10 +249,18 @@ def process_status(
and container_status_state["waiting"]["message"] == "pull QPS exceeded"
):
continue
self.log.error(
"Event: %s has container %s with fatal reason %s",
pod_name,
container_status["name"],
container_status_state["waiting"]["reason"],
)
self.watcher_queue.put(
(pod_name, namespace, TaskInstanceState.FAILED, annotations, resource_version)
)
break
else:
self.log.info("Event: %s Pending, annotations: %s", pod_name, annotations_string)
else:
self.log.debug("Event: %s Pending, annotations: %s", pod_name, annotations_string)
elif status == "Failed":
Expand Down

0 comments on commit 00a2843

Please sign in to comment.