Merge pull request #82772 from zouyee/ccms

fix pod infra containers oom-score-adj testing
This commit is contained in:
Kubernetes Prow Robot 2019-09-17 12:57:16 -07:00 committed by GitHub
commit 28ed0dbbe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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())