kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.43k stars 4.88k forks source link

feature: configuration of pids_limit (podman) #19820

Open rriemann opened 2 weeks ago

rriemann commented 2 weeks ago

What Happened?

I use minikube in two ways:

The workloads fail to create threads with error pthread_create failed (EAGAIN). I can fix this issue outside of minikube with:

podman run --pids-limit -1 alpine cat /sys/fs/cgroup/pids.max

However, I am missing a similar option for minikube to set --pids-limit.

Workaround to change the value system-wide

Have this in your /etc/containers/containers.conf:

[containers]
pids_limit=0

source: https://github.com/kubernetes-sigs/kind/issues/2896#issuecomment-1226184890

Attach the log file

I could not find anything on this in the minikube logs. However, dmesg has:

[ 5351.722836] cgroup: fork rejected by pids controller in /libpod_parent/libpod-6136e1615cd65448ba547e2db748f956cb90c27a7fd54665df8b320302debc07/kubepods.slice/kubepods-pode8d39171_af9d_4c07_b03e_6e72aefc26a8.slice/crio-27f14c6154e2630984fad3eb585e75456d10be978b80cb2c587efc77aa80f219.scope

Operating System

Redhat/Fedora

Driver

Podman

medyagh commented 2 weeks ago

@rriemann thanks for creating the issue, would you say it would be a good default to change the PID limit for everyone? or does this issue only affect your cluster with a specific workload ? do you mind sharing more about what your workload is ?

medyagh commented 2 weeks ago

/triage needs-information /kind support

rriemann commented 2 weeks ago

I am no expert in this area. I was playing with https://github.com/bitnami/charts/tree/main/bitnami/ejbca and just hit the limit on every deploy.

I assume that my OS Fedora limited pids for a reason and if I do not play with minikube, I'd like to conserve the default configuration of my OS.

I understand most people use minikube for testing. So in that sense I would recommend to inrease the default pid limit for everyone. I do not know which value would be a good fit. Hence, I believe the pid limit should be accessible via the arguments to the minikube start command and rest inside the user config next to the existing values for cpus and memory.