-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libcontainer: cgroups: deal with unlimited case for pids.max #644
Conversation
Instead of -1 is there like maxint that can be used? Is there a limit in the kernel for number of pids? |
Should we use something like |
My main reason for using |
What about |
@hqhq Heh, I feel like we're reliving the discussion in #58. Since none of the other stats structs I can see use pointers (and they don't make sense if you contrast the use with opencontainers/runtime-spec#233), I feel like we should just stick with |
Maybe |
If you're fine with
Should we return |
I think that we should return the value set for the container. Anything outside should be properly managed by the admin or higher orchestration layer. |
I've updated the following:
|
Make sure we don't error out collecting statistics for cases where pids.max == "max". In that case, we can use a limit of 0 which means "unlimited". In addition, change the name of the stats attribute (Max) to mirror the name of the resources attribute in the spec (Limit) so that it's consistent internally. Signed-off-by: Aleksa Sarai <[email protected]>
Signed-off-by: Aleksa Sarai <[email protected]>
LGTM |
fixes my problem in #664 :) |
LGTM |
libcontainer: cgroups: deal with unlimited case for pids.max
Make sure we don't error out collecting statistics for cases where
pids.max == "max". In that case, we can use a limit of 0 which means
"unlimited".
Signed-off-by: Aleksa Sarai [email protected]
Sorry, I forgot about this case in #640. This should fix it.
/cc @hqhq @mrunalp