karoldob opened a new issue, #26354:
URL: https://github.com/apache/airflow/issues/26354
### Apache Airflow version
2.3.4
### What happened
I am using KubernetesPodOperator to launch pod with multiple containers.
When one container fail, Pod becomes in "Error" state, but task is "running".
### What you think should happen instead
When Pod is in Error state, task should fail or restart (?).
### How to reproduce
Simple DAG to reproduce issue - one container fails after 25s.
```
from datetime import datetime
from kubernetes.client import models as k8s
from airflow import DAG
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import
KubernetesPodOperator
containers = [
k8s.V1Container(
name="container-1",
image="ubuntu:16.04",
command=[ "/bin/bash", "-c", "--" ],
args=["while true; do sleep 30; done;"]
),
k8s.V1Container(
name="container-2",
image="ubuntu:16.04",
command=[ "/bin/bash", "-c", "--" ],
args=["while true; do sleep 30; done;"]
),
k8s.V1Container(
name="container-3-failing",
image="ubuntu:16.04",
command=[ "/bin/bash", "-c", "--" ],
args=[ 'for i in {1..5}; do sleep 5; echo "$i" ; done; exit 1']
)
]
with DAG(
dag_id='multi_containers_one_fail',
schedule_interval=None,
start_date=datetime(2021, 1, 1),
) as dag:
k = KubernetesPodOperator(
namespace="airflow-test",
name="test-pod",
task_id="task",
is_delete_operator_pod=True,
full_pod_spec=k8s.V1Pod(spec=k8s.V1PodSpec(containers=containers))
)
k
```
### Operating System
Debian GNU/Linux 11 (bullseye)
### Versions of Apache Airflow Providers
apache-airflow-providers-cncf-kubernetes==4.3.0
apache-airflow-providers-celery==3.0.0
### Deployment
Official Apache Airflow Helm Chart
### Deployment details
I am using CeleryExecutor
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]