jameslamb commented on a change in pull request #17953:
URL: https://github.com/apache/airflow/pull/17953#discussion_r727316704
##########
File path: airflow/providers/cncf/kubernetes/utils/pod_launcher.py
##########
@@ -128,7 +128,12 @@ def start_pod(self, pod: V1Pod, startup_timeout: int =
120):
self.log.warning("Pod not yet started: %s", pod.metadata.name)
delta = dt.now() - curr_time
if delta.total_seconds() >= startup_timeout:
- raise AirflowException("Pod took too long to start")
+ msg = (
+ f"Pod took longer than {startup_timeout} seconds to
start. "
+ "Increasing 'startup_timeout' might resolve this
error, but check the pod events in kubernetes "
+ "for structural errors like a missing imagePullSecret."
Review comment:
> I'd rather have no examples in every single exception and just point
people to the events
Ok sure! I'll update to that
> Another factor here is that the events should also be logged in the task
log (in theory). Did this not happen for you?
Logging events is turned off by default in `KubernetesPodOperator`.
https://github.com/apache/airflow/blob/b8d06e812ac56af6b0d17830c63b705ace9d4959/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py#L214
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]