Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Abandoned
-
None
-
None
-
None
Description
I propose to add an option to write out a termination message to a file that indicates the terminal application status. With the change proposed in FLINK-10743, we can't use the exit code to differentiate between cancelled and succeeded applications.
The motivating use case for both this ticket and FLINK-10743 are Flink job clusters (StandaloneJobClusterEntryPoint) with Kubernetes. The idea of the termination message comes from Kubernetes (https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/).
With this in place a terminated Pod will report the final status as in:
state: terminated: exitCode: 0 finishedAt: 2018-11-20T11:00:59Z message: CANCELED # <--- termination message reason: Completed startedAt: 2018-11-20T10:59:18Z
The implementation could be done in ClusterEntrypoint#runClusterEntrypoint(ClusterEntrypoint) which is used by all entry points to run Flink.