Radeity opened a new issue, #13882: URL: https://github.com/apache/dolphinscheduler/issues/13882
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar issues. ### What happened Sometimes, we can not collect complete pod logs if pod fails. We collect logs: ``` ... [K8S-pod-log-spark-pi]: + CMD=("$SPARK_HOME/bin/spark-submit" --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" --deploy-mode client "$@") [K8S-pod-log-spark-pi]: + exec /usr/bin/tini -s -- /opt/spark/bin/spark-submit --conf spark.driver.bindAddress=10.244.2.175 --deploy-mode client --properties-file /opt/spark/conf/spark.properties --class org.apache.spark.examples.SparkPi hdfs://10.176.24.55:9000/dolphinscheduler/wangwr/resources/spark-examples_2.13-3.2.0.jar 10 [K8S-pod-log-spark-pi]: /opt/spa ``` Complete logs: ``` ... [K8S-pod-log-spark-pi]: + CMD=("$SPARK_HOME/bin/spark-submit" --conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS" --deploy-mode client "$@") [K8S-pod-log-spark-pi]: + exec /usr/bin/tini -s -- /opt/spark/bin/spark-submit --conf spark.driver.bindAddress=10.244.2.175 --deploy-mode client --properties-file /opt/spark/conf/spark.properties --class org.apache.spark.examples.SparkPi hdfs://10.176.24.55:9000/dolphinscheduler/wangwr/resources/spark-examples_2.13-3.2.0.jar 10 [K8S-pod-log-spark-pi]: /opt/spark/bin/spark-class: line 71: /opt/jdk/bin/java: No such file or directory [K8S-pod-log-spark-pi]: /opt/spark/bin/spark-class: line 96: CMD: bad array subscript ``` It can be seen that the last two lines of error logs are lost. ### What you expected to happen Collect complete pod log whether pod runs successfully or not. ### How to reproduce Not always incomplete! It only happens when `PipedInputStream` and `PipedOutputStream` are closed before api server sends back complete log in response of the last polling. ### Anything else _No response_ ### Version dev ### 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://www.apache.org/foundation/policies/conduct) -- 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]
