Skip to content

The task is stuck in a queued state forever in case of pod launch errors #36403

Closed

Description

@dirrao

Apache Airflow Provider(s)

cncf-kubernetes

Versions of Apache Airflow Providers

apache-airflow-providers-cncf-kubernetes: 7.11.0

Apache Airflow version

2.8.0

Operating System

Cent OS 7

Deployment

Other

Deployment details

Terraform based deployment

What happened

When the K8 executor is unable to launch the worker pod due to permissions issues or an invalid namespace. The K8 executor keep trying to launch the worker pod and the errors remain persist. So, the task ends up in a queued state for so long/forever.

What you think should happen instead

We shouldn't retry the worker pods launch continuously in case of persistent/transient errors. Let the executor mark them as failed and let the scheduler honor the task retries with retry delay (5 mins) and then fail the task eventually if the error persists.

How to reproduce

We can try the following scenarios
a> Provide incorrect namespace in prod_override configuration
b> Role that doesn't have permissions to launch the pod in a specific namespace
c> namespace quota exhausted

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. changed the title [-]K8 exectuor retring on launching the worker pods forver in case of persistant errors[/-] [+]The task is stuck in a queued state forever in case of pod launch errors[/+] on Dec 24, 2023
  2. added and removed
    needs-triagelabel for new issues that we didn't triage yet
    on Dec 24, 2023
  3. potiuk commented on Dec 24, 2023

    @potiuk
    Member

    feel free to attempt to handle it

  4. adihakimi commented on Dec 25, 2023

    @adihakimi

    We’re facing the same issue on v2.6.3.
    We thought that ‘scheduler_task_queued_timeout’ might help but it doesn’t.

  5. dirrao commented on Dec 25, 2023

    @dirrao
    ContributorAuthor

    scheduler_task_queued_timeout

    Existing options doesn't help here. I am going to raise a MR to fix this issue very soon.

  6. RNHTTR commented on Jan 17, 2024

    @RNHTTR
    Contributor

    Hey @dirrao -- Wondering if you had a chance to open a PR for this?

  7. dirrao commented on Jan 18, 2024

    @dirrao
    ContributorAuthor

    @RNHTTR The MR is ready and I will most likely to raise the MR in this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions