Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes XCOM 10.1.0 regresssion, sidecar isn't being shutdown after job is complete #45452

Open
2 tasks done
kjuulh opened this issue Jan 7, 2025 · 2 comments · May be fixed by #45455
Open
2 tasks done

Kubernetes XCOM 10.1.0 regresssion, sidecar isn't being shutdown after job is complete #45452

kjuulh opened this issue Jan 7, 2025 · 2 comments · May be fixed by #45455
Assignees
Labels
area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet provider:cncf-kubernetes Kubernetes provider related issues

Comments

@kjuulh
Copy link

kjuulh commented Jan 7, 2025

Apache Airflow Provider(s)

cncf-kubernetes

Versions of Apache Airflow Providers

apache-airflow-providers-cncf-kubernetes==10.1.0

Apache Airflow version

2.10.4

Operating System

alpine

Deployment

Other Docker-based deployment

Deployment details

self hosted kubernetes on AWS

What happened

When the KubernetesPodOperator runs with xcom_push

it ends up stalling in the end because of

Running command... if [ -s /airflow/xcom/return.json ]; then cat /airflow/xcom/return.json; else echo __airflow_xcom_result_empty__; fi
Running command... kill -2 $(pgrep -u $(whoami) -f trap)
stderr from command: whoami: unknown uid 1000
pgrep: unknown user -f

What you think should happen instead

A recent change caused this to change because it looks like the username changed, (now root). And we don't want to shut down all processed only the sleep that is causing the sidecar to wait. However, the new setup doesn't pick up those processed, and just returns an empty result.

How to reproduce

Can be tested manually either with the kubernetespodoperator, or via. debian/ubuntu by itself

 docker run -it alpine sh
 sh -c trap "exit 0" INT; while true; do sleep 1; done;
 
 # in another terminal or docker desktop
 $(pgrep -u $(whoami) -f trap)
 # it returns nothing because of -f trap. If it is removed we get three process ids and it works

Anything else

All the time.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@kjuulh kjuulh added area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 7, 2025
Copy link

boring-cyborg bot commented Jan 7, 2025

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@dosubot dosubot bot added the provider:cncf-kubernetes Kubernetes provider related issues label Jan 7, 2025
@kjuulh kjuulh changed the title Kubernetes XCOM 10.1.0 regresssion, sidecar isn't being shutdown after job is over. Kubernetes XCOM 10.1.0 regresssion, sidecar isn't being shutdown after job is complete Jan 7, 2025
@potiuk
Copy link
Member

potiuk commented Jan 7, 2025

Assigned you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants