Skip to content

Commit 568231c

Browse files
lifubangcyphar
authored andcommitted
Revert "increase memory.max in cgroups.bats"
This reverts commit 65a1074. We needed [1] because when we removed the bindfd logic in [2] we had not yet moved the binary cloning logic to Go and thus it was necessary to increase the memory limit in CI because the clone was happening after joining the cgroup. However, [3] finally moved that code to Go and thus the cloning is now done outside of the container's cgroup and thus is no longer accounted as part of the container's memory usage at any point. Now we can properly support running a simple container with lower memory usage as we did before. [1]: commit 65a1074 ("increase memory.max in cgroups.bats") [2]: commit b999376 ("nsenter: cloned_binary: remove bindfd logic entirely") [3]: commit 0e9a335 ("nsexec: migrate memfd /proc/self/exe logic to Go code") Signed-off-by: lfbzhm <[email protected]> [cyphar: fixed commit messages] Signed-off-by: Aleksa Sarai <[email protected]>
1 parent ca8ca3c commit 568231c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/integration/cgroups.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ convert_hugetlb_size() {
303303
"memory.min": "131072",
304304
"memory.low": "524288",
305305
"memory.high": "5242880",
306-
"memory.max": "20484096",
306+
"memory.max": "10485760",
307307
"pids.max": "99",
308308
"cpu.max": "10000 100000",
309309
"cpu.weight": "42"
@@ -319,14 +319,14 @@ convert_hugetlb_size() {
319319
echo "$output" | grep -q '^memory.min:131072$'
320320
echo "$output" | grep -q '^memory.low:524288$'
321321
echo "$output" | grep -q '^memory.high:5242880$'
322-
echo "$output" | grep -q '^memory.max:20484096$'
322+
echo "$output" | grep -q '^memory.max:10485760$'
323323
echo "$output" | grep -q '^pids.max:99$'
324324
echo "$output" | grep -q '^cpu.max:10000 100000$'
325325

326326
check_systemd_value "MemoryMin" 131072
327327
check_systemd_value "MemoryLow" 524288
328328
check_systemd_value "MemoryHigh" 5242880
329-
check_systemd_value "MemoryMax" 20484096
329+
check_systemd_value "MemoryMax" 10485760
330330
check_systemd_value "TasksMax" 99
331331
check_cpu_quota 10000 100000 "100ms"
332332
check_cpu_weight 42
@@ -368,7 +368,7 @@ convert_hugetlb_size() {
368368
}
369369
| .linux.resources.unified |= {
370370
"memory.min": "131072",
371-
"memory.max": "40484864",
371+
"memory.max": "10485760",
372372
"pids.max": "42",
373373
"cpu.max": "5000 50000",
374374
"cpu.weight": "42"
@@ -383,7 +383,7 @@ convert_hugetlb_size() {
383383

384384
runc exec test_cgroups_unified cat /sys/fs/cgroup/memory.max
385385
[ "$status" -eq 0 ]
386-
[ "$output" = '40484864' ]
386+
[ "$output" = '10485760' ]
387387

388388
runc exec test_cgroups_unified cat /sys/fs/cgroup/pids.max
389389
[ "$status" -eq 0 ]

0 commit comments

Comments
 (0)