update process name to fix pod infra containers oom-score-adj should be -998 and best effort container's should be 1000

Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
This commit is contained in:
zouyee 2019-09-17 11:25:38 +08:00
parent 9d8acc02b6
commit efcf4f4da2

View File

@ -118,6 +118,7 @@ var _ = framework.KubeDescribe("Container Manager Misc [Serial]", func() {
}, },
}, },
}) })
var pausePids []int var pausePids []int
ginkgo.By("checking infra container's oom-score-adj") ginkgo.By("checking infra container's oom-score-adj")
gomega.Eventually(func() error { gomega.Eventually(func() error {
@ -139,12 +140,12 @@ var _ = framework.KubeDescribe("Container Manager Misc [Serial]", func() {
var shPids []int var shPids []int
ginkgo.By("checking besteffort container's oom-score-adj") ginkgo.By("checking besteffort container's oom-score-adj")
gomega.Eventually(func() error { gomega.Eventually(func() error {
shPids, err = getPidsForProcess("serve_hostname", "") shPids, err = getPidsForProcess("agnhost", "")
if err != nil { if err != nil {
return fmt.Errorf("failed to get list of serve hostname process pids: %v", err) return fmt.Errorf("failed to get list of serve hostname process pids: %v", err)
} }
if len(shPids) != 1 { if len(shPids) != 1 {
return fmt.Errorf("expected only one serve_hostname process; found %d", len(shPids)) return fmt.Errorf("expected only one agnhost process; found %d", len(shPids))
} }
return validateOOMScoreAdjSetting(shPids[0], 1000) return validateOOMScoreAdjSetting(shPids[0], 1000)
}, 2*time.Minute, time.Second*4).Should(gomega.BeNil()) }, 2*time.Minute, time.Second*4).Should(gomega.BeNil())