From e4f5169890c01cc5f9c557820fd4abc1f0eb21be Mon Sep 17 00:00:00 2001 From: Tobias Kuhn Date: Tue, 2 Jul 2024 13:24:49 +0200 Subject: [PATCH] Fix unlimited memory.max not correctly detected from cgroups2 (#26) KNUTH-102242 --- run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run.sh b/run.sh index 6b4d986..652399a 100755 --- a/run.sh +++ b/run.sh @@ -10,7 +10,7 @@ fp_calc_to_int() { CGROUPS_MEM_LIMIT_BYTES=$(cat /sys/fs/cgroup/memory.max /sys/fs/cgroup/memory/memory.limit_in_bytes 2>/dev/null) -if [ "$CGROUPS_MEM_LIMIT_BYTES" = "9223372036854771712" ] || [ "X${CGROUPS_MEM_LIMIT_BYTES}X" = "XX" ]; then +if [ "$CGROUPS_MEM_LIMIT_BYTES" = "9223372036854771712" ] || [ "X${CGROUPS_MEM_LIMIT_BYTES}X" = "XX" ] || [ "${CGROUPS_MEM_LIMIT_BYTES}" = "max" ]; then echo "There is no cgroups memory limit in place, falling back to default behavior (not setting any limit)." CALCULATED_OPTS="" else