Make POD container last OOM victim.
Setting the oom_score_adj of the PID of the POD container to -100 which is less than the default of 0. This ensures that this PID is the last OOM victim chosen by the kernel. Fixes #3067.
This commit is contained in:
@@ -97,14 +97,28 @@ func TestRunOnce(t *testing.T) {
|
||||
label: "syncPod",
|
||||
container: docker.Container{
|
||||
Config: &docker.Config{Image: "someimage"},
|
||||
State: docker.State{Running: true},
|
||||
State: docker.State{Running: true, Pid: 42},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "syncPod",
|
||||
container: docker.Container{
|
||||
Config: &docker.Config{Image: "someimage"},
|
||||
State: docker.State{Running: true},
|
||||
State: docker.State{Running: true, Pid: 42},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "syncPod",
|
||||
container: docker.Container{
|
||||
Config: &docker.Config{Image: "someimage"},
|
||||
State: docker.State{Running: true, Pid: 42},
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "syncPod",
|
||||
container: docker.Container{
|
||||
Config: &docker.Config{Image: "someimage"},
|
||||
State: docker.State{Running: true, Pid: 42},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user