diff --git a/cluster/saltbase/salt/kube-proxy/initd b/cluster/saltbase/salt/kube-proxy/initd index 4e8f72e1b6b..658689949e3 100644 --- a/cluster/saltbase/salt/kube-proxy/initd +++ b/cluster/saltbase/salt/kube-proxy/initd @@ -40,6 +40,13 @@ DAEMON_USER=root # do_start() { + # Avoid a potential race at boot time when both monit and init.d start + # the same service + PIDS=$(pidof $DAEMON) + for PID in ${PIDS}; do + kill -9 $PID + done + # Raise the file descriptor limit - we expect to open a lot of sockets! ulimit -n 65536 diff --git a/cluster/saltbase/salt/kubelet/initd b/cluster/saltbase/salt/kubelet/initd index 5af22468ada..5379c8e07d8 100644 --- a/cluster/saltbase/salt/kubelet/initd +++ b/cluster/saltbase/salt/kubelet/initd @@ -39,6 +39,13 @@ DAEMON_USER=root # do_start() { + # Avoid a potential race at boot time when both monit and init.d start + # the same service + PIDS=$(pidof $DAEMON) + for PID in ${PIDS}; do + kill -9 $PID + done + # Return # 0 if daemon has been started # 1 if daemon was already running