zookeeper-docker
zookeeper-docker copied to clipboard
Use dumb-init
Currently Zookeeper runs as PID 1. This is a problem because it does not reap child processes. When run under Kubernetes, if a command is used to check the liveness of Zookeeper such as
test "$(echo ruok | nc -q 3 127.0.0.1 2181)" = imok
then these shell processes will linger in the container as zombies and
pile up over time. Depending on the frequency of the checks and how long
Zookeeper is up, this could lead to an excessive number of processes and
eventually cause an outage, or cause some other weird behaviors on the
host, such as ps taking 20min to print anything.