Airflow Kubernetes Executor spams etcd when task fails because of exceeded quota
error
#35792
Closed
1 of 2 tasks
Labels
area:providers
kind:bug
This is a clearly a bug
provider:cncf-kubernetes
Kubernetes provider related issues
Apache Airflow version
Other Airflow 2 version (please specify below)
What happened
I am using Airflow 2.5.2 but this issue applies to all versions of Airflow.
When I'm creating a task and I don't have enough quota for the Airflow executor to create the kubernetes api returns an ApiException with the status code 403 that says
Reason: Forbidden
with the message:Pods ... is forbidden: exceeded quota: ...
. The Kubernetes executor puts the task back in the queue because the status code is not 400 or 422, fromkubernetes_executor.py
:The problem is that it tries excessively to run the task again and again and it spams the Kubernetes API which then makes kyverno write a lot of obejcts to etcd.
What you think should happen instead
I want to be able to control the amount of times the scheduler re-queues a job and the timeout between each time it tires to re-run the task if it was re-queued.
How to reproduce
Run an Airflow task with insufficient memory and cpu in the ACRQ
Operating System
Red Hat Enterprise Linux 8.5 (Ootpa)
Versions of Apache Airflow Providers
No response
Deployment
Other 3rd-party Helm chart
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: