Commit Graph

5 Commits

Author SHA1 Message Date
Daniel J Walsh aaaac87784 Don't up the default number of open files, just processes.
Python call to Popen attempt to close all open file descriptors by looking at
the maximum number of open file descripors defined in ulimits.  If we set
this to a huge number by default Popen will run much slower since it will
attempt to close the total number of FDs one by one.

We should just use the default that the calling process had unless the user
overrides the default in containers.conf.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-05 10:46:28 -05:00
Daniel J Walsh 46d6f01773 Merge pull request #52 from rhatdan/version
Setup default ulimits to nproc & nofile of current process
2020-02-04 07:02:06 -05:00
Sascha Grunert 38c952b22d Fix 32bit build by using unix.CGROUP2_SUPER_MAGIC
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-02-04 11:30:40 +01:00
Daniel J Walsh 8241546743 Setup default ulimits to nproc & nofile of current process
In root running containers we want to approach the MAX  Number of processes and
open files, so that services running Podman will work when they have lots of open
files or processes.  In rootless containers this number can not be changed.  This
patch will only increase the numbers if the process is allowed.

Docker set the limit to 2**20 (1048576), it looks like this was the max for RHEL5 OS.
So we fall back to attempt to set this limit if the MAC_PROC limit is not allowed.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-02-03 13:50:28 -05:00
Daniel J Walsh b3d6ec550e Fix definitions for cross compilers
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-16 16:58:38 -05:00