diff --git a/hack/test/e2e.sh b/hack/test/e2e.sh index 28ac28719d..3b34b5b5db 100755 --- a/hack/test/e2e.sh +++ b/hack/test/e2e.sh @@ -126,6 +126,9 @@ function create_cluster_capi { ${KUBECTL} get nodes -l node-role.kubernetes.io/control-plane='' && : sleep 10 done + + # verify that RLIMIT_NOFILE is set to 1048576 + ${KUBECTL} run --rm --restart=Never -it foo --image=alpine -- /bin/sh -c "ulimit -n" | grep -q 1048576 } function run_talos_integration_test { diff --git a/internal/app/wrapperd/main.go b/internal/app/wrapperd/main.go index 435e256c52..8db49359ee 100644 --- a/internal/app/wrapperd/main.go +++ b/internal/app/wrapperd/main.go @@ -50,13 +50,6 @@ func Main() { } } - // set the rlimit for the process before we drop privileges - // TODO: frezbo: see if we need to drop Rlimit from the boot sequence, the only downside maybe that some very early process might - // not have the higher rlimit set, but it seems we always use the wrapper to start processes. - if err := unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{Max: 1048576, Cur: 1048576}); err != nil { - log.Fatalf("failed to set rlimit: %v", err) - } - // load the cgroup and put the process into the cgroup if cgroupPath != "" { if cgroups.Mode() == cgroups.Unified {