Skip to content

Commit

Permalink
Increase pids limits to fix connection reset flake
Browse files Browse the repository at this point in the history
See opencontainers/runc#1914

[#159069922]
  • Loading branch information
danail-branekov committed Oct 30, 2018
1 parent 289117c commit e2d8121
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions limits_test.go
Expand Up @@ -327,14 +327,14 @@ var _ = Describe("Limits", func() {
Skip("kernel version should be at 4.4 or later")
}

limits.Pid = garden.PidLimits{Max: 20}
limits.Pid = garden.PidLimits{Max: 50}
})

It("prevents forking of processes", func() {
exitCode, _, stderr := runProcess(container, garden.ProcessSpec{
User: "root",
Path: "sh",
Args: []string{"-c", "for i in `seq 1 20`; do sleep 2 & done"},
Args: []string{"-c", "for i in `seq 1 50`; do sleep 2 & done"},
})

Expect(exitCode).To(Equal(2))
Expand Down
10 changes: 5 additions & 5 deletions peas_test.go
Expand Up @@ -226,7 +226,7 @@ var _ = Describe("Partially shared containers (peas)", func() {
CPU: garden.CPULimits{LimitInShares: 1024},
Disk: garden.DiskLimits{ByteHard: gb},
Memory: garden.MemoryLimits{LimitInBytes: 64 * mb},
Pid: garden.PidLimits{Max: 10},
Pid: garden.PidLimits{Max: 50},
}
})

Expand Down Expand Up @@ -254,9 +254,9 @@ var _ = Describe("Partially shared containers (peas)", func() {
It("does not share memory limit with the container", func() {
exitCode, _, _ := runProcess(container,
garden.ProcessSpec{
Path: "dd",
Args: []string{"if=/dev/urandom", "of=/dev/shm/too-big", "bs=1M", "count=65"},
Image: peaImage,
Path: "dd",
Args: []string{"if=/dev/urandom", "of=/dev/shm/too-big", "bs=1M", "count=65"},
Image: peaImage,
OverrideContainerLimits: &garden.ProcessLimits{},
})
Expect(exitCode).To(Equal(0))
Expand All @@ -270,7 +270,7 @@ var _ = Describe("Partially shared containers (peas)", func() {
until [ $(ps aux | wc -l) -gt 15 ]; do sleep .5; done
killall sleep
`},
Image: peaImage,
Image: peaImage,
OverrideContainerLimits: &garden.ProcessLimits{},
})
Expect(exitCode).To(Equal(0))
Expand Down

0 comments on commit e2d8121

Please sign in to comment.