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

Clarify meaning of --cgroup-parent #141

Closed
LK4D4 opened this issue Jul 20, 2015 · 9 comments
Closed

Clarify meaning of --cgroup-parent #141

LK4D4 opened this issue Jul 20, 2015 · 9 comments

Comments

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 20, 2015

Now, as I see abs and rel paths for --cgroup-parent creates identical cgroup hierarchy.

ls /sys/fs/cgroup/memory/system.slice/docker-65c642b685216ddeb40b3ea34892ac97faa1dc3487e9c8dfcf0fdf7ed05d0941.scope/test/7f299d5c524193189cabcc01df143c88abe95ac1e274b36926340e000a5e786c/

it looks like this for both cases. Seems like for --cgroup-parent it should be like

ls /sys/fs/cgroup/memory/system.slice/docker-65c642b685216ddeb40b3ea34892ac97faa1dc3487e9c8dfcf0fdf7ed05d0941.scope/7f299d5c524193189cabcc01df143c88abe95ac1e274b36926340e000a5e786c/test

right?
ping @vishh @mrunalp

@mrunalp
Copy link
Contributor

mrunalp commented Jul 20, 2015

I think that for relative case it should be

/sys/fs/cgroup/memory/system.slice/docker-65c642b685216ddeb40b3ea34892ac97faa1dc3487e9c8dfcf0fdf7ed05d0941.scope/test/7f299d5c524193189cabcc01df143c88abe95ac1e274b36926340e000a5e786c/

But for abs, it should be

/sys/fs/cgroup/memory/test/7f299d5c524193189cabcc01df143c88abe95ac1e274b36926340e000a5e786c/

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jul 20, 2015

@mrunalp but it's impossible, I can't leave mount namespace of container to create

/sys/fs/cgroup/memory/test/7f299d5c524193189cabcc01df143c88abe95ac1e274b36926340e000a5e786c/

treat my

/sys/fs/cgroup/memory/system.slice/docker-65c642b685216ddeb40b3ea34892ac97faa1dc3487e9c8dfcf0fdf7ed05d0941.scope

as /sys/fs/cgroup/memory, because it's in container.
We can discuss how it should be on host, without my crappy slices.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jul 20, 2015

So, I disabled my systemd noise, now path with parents:

/sys/fs/cgroup/memory/test/c8af2a2a2b82c46e3120034a0cfe9288e4f118b6f7ec0dabeaf489cc25a66fb2

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jul 20, 2015

So, we basically don't understand for what we need absolute paths. You can't create cgroups in parent namespace anyway and if you want to use existing cgroup from host you can use only your own cgroup, so you always can use relative path.

@vishh
Copy link
Contributor

vishh commented Jul 20, 2015

@LK4D4 absolute paths are required for providing QoS tiers. These cgroups can be created from within the root namespace. Unless we provide subcontainer capabilities, I don't see a need for --cgroup-parent. That feature is useful mainly for orchestration.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Jul 20, 2015

@vishh Could you provide example how it should look? Because now they're(abs and rel) identical.

@vishh
Copy link
Contributor

vishh commented Jul 20, 2015

If the path is relative, then the cgroups are expected to be created under the cgroup of the calling process. Ex: cgroups created under /sys/fs/cgroup/memory/docker, in the case of docker daemon.
In the case of runc by itself, both abs and rel paths will be the same.
If there is no need for relative cgroup parent paths, we can eliminate that to avoid ambiguity.

@fabiokung
Copy link
Contributor

Should this be closed? The --cgroup-parent option doesn't even seem to exist anymore.

@LK4D4
Copy link
Contributor Author

LK4D4 commented Aug 11, 2015

@fabiokung it's still exitst in libcontainer but I still didn't get it :D But I'll delay to personal meeting with Vishnu.

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

4 participants