mirror of
https://github.com/kubesphere/kubekey.git
synced 2025-12-26 01:22:51 +00:00
Merge pull request #1169 from yuzhiquan/remove-z
Remove zombie process crontab
This commit is contained in:
commit
72f3727304
|
|
@ -18,9 +18,10 @@ package templates
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/kubesphere/kubekey/pkg/bootstrap/registry"
|
||||
"text/template"
|
||||
|
||||
"github.com/kubesphere/kubekey/pkg/bootstrap/registry"
|
||||
|
||||
"github.com/kubesphere/kubekey/pkg/common"
|
||||
"github.com/kubesphere/kubekey/pkg/core/connector"
|
||||
"github.com/lithammer/dedent"
|
||||
|
|
@ -145,10 +146,6 @@ update-alternatives --set ebtables /usr/sbin/ebtables-legacy >/dev/null 2>&1 ||
|
|||
ulimit -u 65535
|
||||
ulimit -n 65535
|
||||
|
||||
crontab -l | grep -v '#' > /tmp/file1
|
||||
echo "0 3 * * * ps -A -ostat,ppid | grep -e '^[Zz]' | awk '{print $2}' | xargs kill -HUP > /dev/null 2>&1" >> /tmp/file1 && awk ' !x[$0]++{print > "/tmp/file1"}' /tmp/file1
|
||||
crontab /tmp/file1
|
||||
rm -rf /tmp/file1
|
||||
`)))
|
||||
|
||||
func GenerateHosts(runtime connector.ModuleRuntime, kubeConf *common.KubeConf) []string {
|
||||
|
|
|
|||
Loading…
Reference in New Issue