Kubernetes PodManager's xcom sidecar kill command is invalid for containers where /bin/sh is dash #37903
Closed
2 tasks done
Labels
area:core
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
Apache Airflow version
2.8.2
If "Other Airflow 2 version" selected, which one?
No response
What happened?
When using a kubernetes connection that has an XCom sidecar image value set to an image where
/bin/sh
isdash
, the pod manager attempts to runkill -s SIGINT 1
using/bin/sh
which printskill: invalid signal number or name: SIGINT
and fails to kill the process. This works fine with the defaultalpine
image, but not with debian-based ones (like the default python image). Seeairflow/airflow/providers/cncf/kubernetes/utils/pod_manager.py
Line 776 in 2852976
What you think should happen instead?
The pod manager should either let you customize the shell used (so I can specify
/bin/bash
instead of/bin/sh
) or should use the more portable signal numbers instead (kill -2 1
, which is the equivalent command) which should work with any container with a POSIX/bin/sh
.How to reproduce
Set the XCom sidecar image for a kubernetes connection to
python:latest
and then use that connection to start a task with theKubernetesPodOperator
withdo_xcom_push=True
. Notice that the sidecar prints an error and doesn't terminate.Operating System
Debian GNU/Linux
Versions of Apache Airflow Providers
No response
Deployment
Official Apache Airflow 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: