[ https://issues.apache.org/jira/browse/FLINK-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15417255#comment-15417255 ]
Ismaël Mejía commented on FLINK-4326: ------------------------------------- A separation of (daemon/console) scripts would be the nicest, no doubt. However, I am not sure if removing the PID code + output will be appropriate when we run daemons and foreground processes at the same time, how do we count the running instances if somebody runs a new process in foreground mode, or what would be the logic if we call stop-all, must we kill all the processes even the foreground ones ? in these cases I think we need the PID/output refs, but well I am not really sure and maybe we can do such things without it. Independent of this we must also not forget that we should preserve at least the same options (start|stop|stop-all) for both jobmanager.sh and taskmanager. because they do their magic (build the runtime options) and at the end they call the the (daemon/console) script. I suppose we will need the new start-foreground option in these scripts too, or are there any other ideas of how to do it best ? > Flink start-up scripts should optionally start services on the foreground > ------------------------------------------------------------------------- > > Key: FLINK-4326 > URL: https://issues.apache.org/jira/browse/FLINK-4326 > Project: Flink > Issue Type: Improvement > Components: Startup Shell Scripts > Affects Versions: 1.0.3 > Reporter: Elias Levy > > This has previously been mentioned in the mailing list, but has not been > addressed. Flink start-up scripts start the job and task managers in the > background. This makes it difficult to integrate Flink with most processes > supervisory tools and init systems, including Docker. One can get around > this via hacking the scripts or manually starting the right classes via Java, > but it is a brittle solution. > In addition to starting the daemons in the foreground, the start up scripts > should use exec instead of running the commends, so as to avoid forks. Many > supervisory tools assume the PID of the process to be monitored is that of > the process it first executes, and fork chains make it difficult for the > supervisor to figure out what process to monitor. Specifically, > jobmanager.sh and taskmanager.sh should exec flink-daemon.sh, and > flink-daemon.sh should exec java. -- This message was sent by Atlassian JIRA (v6.3.4#6332)