ralichkov commented on issue #39791: URL: https://github.com/apache/airflow/issues/39791#issuecomment-3340641574
Will try to dig into this in the next couple of weeks. I have to test locally to be sure, but my current suspicion is that when a worker dies, e.g. by `SIGTERM`, that could be triggering [this finally block](https://github.com/apache/airflow/blob/dc9ad8c53ceabfea24b5bd8f11f18b1c14bb7a46/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py#L736), causing the pod to be deleted. So, maybe the cleanup logic in `finally` should be conditional depending on `reattach_on_restart`? What I did make sure of is that `termination_grace_period` does accurately changes delay before the KPO pod is deleted. This leads me to think that the operator is in charge of the pod deletion. -- 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]
