-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Get PIDs from cgroups recursively #330
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
Conversation
libcontainer/cgroups/fs/apply_raw.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u are not getting the error from Walk here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, I'm not returning it as well. I think I need to return at leas in case of "cgroup.procs"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea was to get as much pids as possible :)
|
@crosbymichael I changed to return any error on procs file processing. |
libcontainer/cgroups/fs/apply_raw.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this check here? shouldn't it be at the top?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to stop process on errors for other files. In user-namespace this can be an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
humm, interesting...
But there error that you get in iErr happens from the previous iteration right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@crosbymichael if you're talking about the walk iteration, iErr is the error for the current path or a file directly under the current path
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I think iError is error from Stat on p.
|
Don't we need to change |
|
@LK4D4 thanks, we will test out this patch. |
|
@hqhq You're right, I'll fix tomorrow. It's weird that implementations are different. |
|
@hqhq Updated for systemd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the code into a common functions in utils to avoid duplication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do this, what do you think about same cgroup for both implementations? Like "devices".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good.
Also lookup cgroup for systemd is changed to "device" to be consistent with fs implementation. Signed-off-by: Alexander Morozov <[email protected]>
|
LGTM |
1 similar comment
|
LGTM |
|
IANTM but |
|
What's up with janky? |
|
Closes #331 |
|
@mrunalp the "Closes #XXX" has to be part of the description of the PR. (you can edit it) Janky is a little sick, you need to test manually. |
Get PIDs from cgroups recursively
|
We are having some issues with this patch, still investigating. |
|
@LK4D4 ^^ |
|
@ibuildthecloud there's a panic being fixed, see moby/moby#16989 |
|
Anybody want to try my original patch? |
|
@ibuildthecloud feel free to review #332 |
config: Fix indents for process.apparmorProfile and .selinuxLabel
Closes #331
Closes #329
@ibuildthecloud I carried and slightly changed code. Now you can just review and not spend time on my comments in your branch.