Kafka and Zookeeper pods reports reason for termination as Completed even after some failure #10015
Replies: 2 comments 3 replies
-
I'm not sure what is it you expect. If you terminate the broker it will be indeed terminated. There is no bug in that. |
Beta Was this translation helpful? Give feedback.
-
Hi @scholzj , Pod restart is expected and there is no issue with that. But when we see reason in describe pod output, it is Completed with exit code 0 instead of exit code 143. If container stop is not intentional, then reason in describe pod output should not be Completed and that will hide issues. But in Strimzi code exit code 143 is remapped to 0 in this script: https://github.com/strimzi/strimzi-kafka-operator/blob/main/docker-images/kafka-based/kafka/scripts/kafka_run.sh#L122 |
Beta Was this translation helpful? Give feedback.
-
If there is any issue in Kafka and is restarted with below kafka log:
Terminating process due to signal SIGTERM
We see restart reason as completed instead of error.
This issue is reproducible easily, if we kill java process with SIGTERM.
Describe pod output:
Used following chart for operator deployment: https://github.com/strimzi/strimzi-kafka-operator/tree/main/helm-charts/helm3/strimzi-kafka-operator
kakfka CR used: https://github.com/strimzi/strimzi-kafka-operator/blob/main/examples/kafka/kafka-ephemeral-single.yaml
In above output, we can see exit code is 0 and reason is terminated insted of exit code 143. This can hide issues, when container stop is not intentional. Can you please look at issue and let me know if this is a bug?
Thanks & regards,
Saikiran
Beta Was this translation helpful? Give feedback.
All reactions