From e1d696ab007d90bb0208b72655b111c8badbf6ab Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Thu, 8 Feb 2024 09:50:19 -0500 Subject: [PATCH] Set LimitNOFILE to 1048576 instead of `infinity` Signed-off-by: Davanum Srinivas --- nodeup/pkg/model/containerd.go | 2 +- nodeup/pkg/model/tests/containerdbuilder/complex/tasks.yaml | 2 +- nodeup/pkg/model/tests/containerdbuilder/simple/tasks.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nodeup/pkg/model/containerd.go b/nodeup/pkg/model/containerd.go index 19e2de63afc7d..c83cae80290ad 100644 --- a/nodeup/pkg/model/containerd.go +++ b/nodeup/pkg/model/containerd.go @@ -203,7 +203,7 @@ func (b *ContainerdBuilder) buildSystemdService(sv semver.Version) *nodetasks.Se manifest.Set("Service", "LimitNPROC", "infinity") manifest.Set("Service", "LimitCORE", "infinity") - manifest.Set("Service", "LimitNOFILE", "infinity") + manifest.Set("Service", "LimitNOFILE", "1048576") manifest.Set("Service", "TasksMax", "infinity") // make killing of processes of this unit under memory pressure very unlikely diff --git a/nodeup/pkg/model/tests/containerdbuilder/complex/tasks.yaml b/nodeup/pkg/model/tests/containerdbuilder/complex/tasks.yaml index 8da8abbc034d3..e6875764e196c 100644 --- a/nodeup/pkg/model/tests/containerdbuilder/complex/tasks.yaml +++ b/nodeup/pkg/model/tests/containerdbuilder/complex/tasks.yaml @@ -362,7 +362,7 @@ definition: | RestartSec=5 LimitNPROC=infinity LimitCORE=infinity - LimitNOFILE=infinity + LimitNOFILE=1048576 TasksMax=infinity OOMScoreAdjust=-999 diff --git a/nodeup/pkg/model/tests/containerdbuilder/simple/tasks.yaml b/nodeup/pkg/model/tests/containerdbuilder/simple/tasks.yaml index 53c73fc13dc1a..2caad6e486d5c 100644 --- a/nodeup/pkg/model/tests/containerdbuilder/simple/tasks.yaml +++ b/nodeup/pkg/model/tests/containerdbuilder/simple/tasks.yaml @@ -355,7 +355,7 @@ definition: | RestartSec=5 LimitNPROC=infinity LimitCORE=infinity - LimitNOFILE=infinity + LimitNOFILE=1048576 TasksMax=infinity OOMScoreAdjust=-999