mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
Fix the wrong judgment of oom_score_adj
This commit is contained in:
parent
cf3374e434
commit
d0882e69e2
@ -67,7 +67,7 @@ func validateOOMScoreAdjSettingIsInRange(pid int, expectedMinOOMScoreAdj, expect
|
|||||||
if oomScore < expectedMinOOMScoreAdj {
|
if oomScore < expectedMinOOMScoreAdj {
|
||||||
return fmt.Errorf("expected pid %d's oom_score_adj to be >= %d; found %d", pid, expectedMinOOMScoreAdj, oomScore)
|
return fmt.Errorf("expected pid %d's oom_score_adj to be >= %d; found %d", pid, expectedMinOOMScoreAdj, oomScore)
|
||||||
}
|
}
|
||||||
if oomScore < expectedMaxOOMScoreAdj {
|
if oomScore >= expectedMaxOOMScoreAdj {
|
||||||
return fmt.Errorf("expected pid %d's oom_score_adj to be < %d; found %d", pid, expectedMaxOOMScoreAdj, oomScore)
|
return fmt.Errorf("expected pid %d's oom_score_adj to be < %d; found %d", pid, expectedMaxOOMScoreAdj, oomScore)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user