Skip to content
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

Add non-recursive GetPids? #457

Closed
jimmidyson opened this issue Jan 7, 2016 · 7 comments
Closed

Add non-recursive GetPids? #457

jimmidyson opened this issue Jan 7, 2016 · 7 comments

Comments

@jimmidyson
Copy link
Contributor

We are migrating from docker/libcontainer to here & one issue for us is the implementation of GetPids is now recursive. In Kubernetes we use this project's cgroups functionality to get pids from a particular cgroup & move (Apply) them to another one, but we don't want to do this recursively.

How would you feel in adding a non-recursive GetPids? Pretty trivial implementation wise, but not sure how you'd feel about that?

@LK4D4
Copy link
Contributor

LK4D4 commented Jan 7, 2016

It sounds ok to me. Recursive behavior is not very common for such func.

@jimmidyson
Copy link
Contributor Author

It was your PR (#330) that made it recursive 😜

So how do you want to proceed? I'd prefer GetPids to be non-recursive & users walk the cgroup hierarchy themselves if they want to get pids from all sub-cgroups, but changing that functionality back to how it was would impact on existing users of the new GetPids (including Docker afaik). I can put in a PR for this if you let me know how you want to proceed.

@vishh
Copy link
Contributor

vishh commented Jan 8, 2016

Or we can provide both alternatives - GetPids and GetAllPids maybe?

@LK4D4
Copy link
Contributor

LK4D4 commented Jan 8, 2016

@vishh +1

@vishh
Copy link
Contributor

vishh commented Jan 8, 2016

Ok. I'll send a patch in a bit. Hopefully @jimmidyson hasn't started working on a patch already.

@jimmidyson
Copy link
Contributor Author

I'm nearly done tbh.

@vishh
Copy link
Contributor

vishh commented Jan 8, 2016

@jimmidyson: 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants