Skip to content

Conversation

@LK4D4
Copy link
Contributor

@LK4D4 LK4D4 commented Oct 12, 2015

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.

Copy link
Member

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?

Copy link
Contributor Author

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"

Copy link
Contributor Author

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 :)

@LK4D4
Copy link
Contributor Author

LK4D4 commented Oct 12, 2015

@crosbymichael I changed to return any error on procs file processing.

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor

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

Copy link
Contributor Author

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.

@hqhq
Copy link
Contributor

hqhq commented Oct 13, 2015

Don't we need to change apply_systemd.go as well?

@ibuildthecloud
Copy link

@LK4D4 thanks, we will test out this patch.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Oct 13, 2015

@hqhq You're right, I'll fix tomorrow. It's weird that implementations are different.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Oct 13, 2015

@hqhq Updated for systemd.

Copy link
Contributor

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?

Copy link
Contributor Author

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".

Copy link
Contributor

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]>
@crosbymichael
Copy link
Member

LGTM

1 similar comment
@dqminh
Copy link
Contributor

dqminh commented Oct 13, 2015

LGTM

@tiborvass
Copy link
Contributor

IANTM but make test passed for me after merging it in master locally.

@mrunalp
Copy link
Contributor

mrunalp commented Oct 13, 2015

What's up with janky?

@mrunalp
Copy link
Contributor

mrunalp commented Oct 13, 2015

Closes #331

@tiborvass
Copy link
Contributor

@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.

LK4D4 added a commit that referenced this pull request Oct 13, 2015
Get PIDs from cgroups recursively
@LK4D4 LK4D4 merged commit 2bec85d into opencontainers:master Oct 13, 2015
@LK4D4 LK4D4 deleted the recursive_pids branch October 13, 2015 18:06
@ibuildthecloud
Copy link

We are having some issues with this patch, still investigating.

@ibuildthecloud
Copy link

@LK4D4 ^^

@tiborvass
Copy link
Contributor

@ibuildthecloud there's a panic being fixed, see moby/moby#16989

@ibuildthecloud
Copy link

Anybody want to try my original patch?

@tiborvass
Copy link
Contributor

@ibuildthecloud feel free to review #332

stefanberger pushed a commit to stefanberger/runc that referenced this pull request Sep 8, 2017
config: Fix indents for process.apparmorProfile and .selinuxLabel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants