This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Missing logs if the pod was killed by Kubernetes #8780
Comments
I have tried to remove all the try except block and get this stacktrace.
|
AFAIK the tasks logs are uploaded to remote storage once the task is completed, be it Kubernetes, Celery, or even Local executors. One simple solution is to make use of multi read-writes Persistent volume groups to store these logs, so the logs won't be lost even if pod is killed in between. |
@msumit Thank you for your reply.
This actually resolves in my case. But not pretty sure if it is proper to initiate a dynamic session with the |
But, to be honest, it is pretty odd that the function |
@RyanSiu1995 so it means that the worker pod is trying to upload the logs to GCS when being killed, but failing due to some issue in getting DB session? |
Yes, that's exactly what happen with my case. |
I do see from time to time on Airflow 2.2.3 (Kubernetes) that logs are missing with similar message. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Apache Airflow version: 1.10.10
Kubernetes version (if you are using kubernetes) (use
kubectl version
):Environment:
Linux pod-name-597d575d8-xrmkn 4.14.138+ #1 SMP Tue Sep 3 02:58:08 PDT 2019 x86_64 GNU/Linu
pip install
What happened:
We used Kubernetes executor to execute our pipeline with a GCS remote log storage. We encountered the log was not found in the GCS bucket for some DAGs.
It shares the same error like this.
And we have gone into the log on stdout and found that there was error like this.
What you expected to happen:
I expected the logs can still upload to GCS if the pod was unexpectedly killed by Kubernetes.
How to reproduce it:
Write a DAG with the following function.
When the task pod is spawned, kill the pod with kubectl.
The log then will not be able to be uploaded.
Anything else we need to know:
Nope
The text was updated successfully, but these errors were encountered: