potiuk commented on code in PR #35748:
URL: https://github.com/apache/airflow/pull/35748#discussion_r1438559079


##########
chart/templates/workers/worker-deployment.yaml:
##########
@@ -232,7 +233,14 @@ spec:
           {{- if .Values.workers.command }}
           command: {{ tpl (toYaml .Values.workers.command) . | nindent 12 }}
           {{- end }}
-          {{- if .Values.workers.args }}
+          {{- if and .Values.workers.kerberosSidecar.enabled (semverCompare 
"<1.28" $kubeVersion) }}
+          args:
+            - bash
+            - -c
+            - |-
+              exec airflow celery worker &&

Review Comment:
   I do not think it's going to work either. The exec will replace bash 
interpreter at the moment `airflow celery worker` executes and what is after 
`&&` will never get executed.
   
   You can check it by just
   
   ```
   bash -c "exec ls && echo TEST"
   ```
   
   It will only list current directory but it will not echo TEST.
   
   You just can't `exec` when you are running bash-interpreted command as at 
the moment of exec, the process that you run replaces `bash` interpreter.
   
   What you **really** need to do here if you want to use shell, you need  to 
run the worker without exec, but you also need to make sure signal propagation 
happens - so that the parent bash process wil propagate the signals. However 
maybe you do not need to do it when you are using our image - because we are 
using 
   
   `dumb_init` as entrypoint with `DUMB_INIT_SETSID` set to 1 which means that 
dumb-init will propagate signals to ALL the children of bash, not only to bash, 
in which case 
   
   ```
   bash -c "airflow celery worker && sh -c "echo 'EXIT file content' > 
/opt/kerberos-exit/EXIT"
   ````
   
   as command might just work - but you need to test it. run it in kubernetes, 
find the process of worker, send a signal (say TERM) and see if it completes 
and if it correctly writes the EXIT file.
   
https://airflow.apache.org/docs/docker-stack/entrypoint.html#signal-propagation
   
   
   



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to