pdebelak opened a new issue, #37903:
URL: https://github.com/apache/airflow/issues/37903

   ### 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` is `dash`, the pod manager attempts to run `kill -s 
SIGINT 1` using `/bin/sh` which prints `kill: invalid signal number or name: 
SIGINT` and fails to kill the process. This works fine with the default 
`alpine` image, but not with debian-based ones (like the default python image). 
See 
https://github.com/apache/airflow/blob/2852976ea6321b152ebc631d30d5526703bc6590/airflow/providers/cncf/kubernetes/utils/pod_manager.py#L776
 for the code for this.
   
   ### 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 the `KubernetesPodOperator` 
with `do_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?
   
   - [X] 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]

Reply via email to