Skip to content

KubernetesPodOperator hangs on a Pending pod when init_container_logs is set #68445

Description

@aeroyorch

Under which category would you file this issue?

Providers

Apache Airflow version

3.2.1

What happened and how to reproduce it?

Running a KubernetesPodOperator in sync mode (deferrable=False) with init_container_logs enabled, if the pod gets stuck in Pending (unschedulable), the task hangs forever instead of failing after startup_timeout_seconds / schedule_timeout_seconds.

It seems like the init container log following kicks in before the startup timeout is ever checked, so it just waits on the Pending pod indefinitely.

What you think should happen instead?

The task should time out with PodLaunchTimeoutException like it does without init_container_logs.

Operating System

No response

Deployment

None

Apache Airflow Provider(s)

cncf-kubernetes

Versions of Apache Airflow Providers

apache-airflow-providers-cncf-kubernetes==10.16.0

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions