Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wrap weave-kube/launch.sh within tini.
Fixes #2836, i.e. prevents from generating defunct (a.k.a. zombie) launch.sh processes, and also propagates signals from Docker to our processes (i.e. does not reopen #2684). Why: In Docker, ENTRYPOINT is PID 1 and therefore has the responsibility of reaping processes and forwarding signals to child processes, which launch.sh currently does not do. This change leverages tini to bake such behaviour in, as recommended by Docker. See also: - github.com/docker-library/official-images#init - github.com/krallin/tini/issues/8 Sample output: - During initialisation: ``` $ ps auxf USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND [...] root 1380 0.5 1.9 879660 74864 ? Ssl Mar13 5:42 /usr/bin/docker daemon -H fd:// -H unix:/// root 1664 0.0 0.4 502116 18644 ? Ssl Mar13 0:05 \_ docker-containerd -l /var/run/docker/li root 9716 0.0 0.1 134960 5412 ? Sl 11:00 0:00 \_ docker-containerd-shim 4946a0467c5a root 9734 0.0 0.0 736 4 ? Ss 11:00 0:00 | \_ /sbin/tini -s -- /home/weave/la root 9738 6.0 1.5 483756 59948 ? Sl 11:00 0:00 | \_ /home/weave/weaver --port=6 root 10020 0.0 0.0 1524 64 ? S 11:00 0:00 | \_ /bin/sh /home/weave/launch. root 10110 0.0 0.0 1772 1264 ? S 11:00 0:00 | \_ /bin/sh /home/weave/wea root 10135 0.0 0.0 1772 324 ? S 11:00 0:00 | \_ /bin/sh /home/weave root 10136 0.0 0.0 14656 2912 ? S 11:00 0:00 | \_ curl -o /tmp/we [...] ``` - Once initialised successfully: ``` $ ps auxf USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND [...] root 1380 0.5 1.9 879660 74864 ? Ssl Mar13 5:42 /usr/bin/docker daemon -H fd:// -H unix:/// root 1664 0.0 0.4 502116 18644 ? Ssl Mar13 0:05 \_ docker-containerd -l /var/run/docker/li root 9716 0.0 0.1 134960 5412 ? Sl 11:00 0:00 \_ docker-containerd-shim 4946a0467c5a root 9734 0.0 0.0 736 4 ? Ss 11:00 0:00 | \_ /sbin/tini -s -- /home/weave/la root 9738 4.2 1.5 491952 59948 ? Sl 11:00 0:00 | \_ /home/weave/weaver --port=6 [...] ```
- Loading branch information