GitHub user patricklucas opened a pull request:
https://github.com/apache/flink/pull/3734
[FLINK-6300] Use 'exec' in start-foreground calls
To avoid signal-handling issues in Docker, applications need to run as
a single executable or use a process manager that forwards signals
correctly, in either case running as PID 1.
Since Flink uses a number of chained scripts before the ultimate call
to `java`, we need to use `exec` so that the script executable is
replaced, ultimately resulting in a single `java` process as PID 1.
There's no need to run a process manager since Flink only actually
requires a single process.
**Note:** As there has not been a Flink release since these codepaths were
introduced, I'm comfortable with merging this change for 1.2.1 since my manual
testing was successful.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/patricklucas/flink FLINK-6300_docker_pid_1_fix
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3734.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3734
----
commit 3be49de04c239083a5f050bf891834fc8abc12c9
Author: Patrick Lucas <[email protected]>
Date: 2017-04-18T12:48:49Z
[FLINK-6300] Use 'exec' in start-foreground calls
To avoid signal-handling issues in Docker, applications need to run as
a single executable or use a process manager that forwards signals
correctly, in either case running as PID 1.
Since Flink uses a number of chained scripts before the ultimate call
to `java`, we need to use `exec` so that the script executable is
replaced, ultimately resulting in a single `java` process as PID 1.
There's no need to run a process manager since Flink only actually
requires a single process.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---