Uh oh!
There was an error while loading. Please reload this page.
Add container's cgroup readonly mount documentation. - #65
Conversation
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
mrunalp
commented
Jul 8, 2015
See #62 |
wking
commented
Jul 8, 2015
via email
The container should only have /sys/fs/cgroup if it mounts sysfs at
/sys. That's the current default for runc:
$ runc spec
…
{
"type": "sysfs",
"source": "sysfs",
"destination": "/sys",
"options": "nosuid,noexec,nodev"
}
…
but I don't see sysfs mentioned in the specs yet. |
philips
commented
Jul 8, 2015
I don't think I agree with this change. My understanding, from talking to many people, is that the only correct way to make this work is to bind mount the host cgroup hierarchy here and then optionally bind mount the container tree read-write. The problem is that cgroups do not use relative paths in a number of places. Also I am certain that we will want a read-write subtree to support use cases like pods. cc @vmarmol@rjnagal |
crosbymichael
commented
Jul 8, 2015
you can have it RW as well and properly nest in the correct cgroup because it's a subtree for the container. |
mrunalp
commented
Jul 8, 2015
I am not opposed to making it RW. |
philips
commented
Jul 9, 2015
For context here is how we use the cgroup hierarchy in This explanation provides concrete examples. So, could either of you (@mrunalp or @crosbymichael) contrast that with what you are proposing here? |
mrunalp
commented
Jul 9, 2015
@philips |
alban
commented
Jul 9, 2015
What do you mean with the container's own cgroups? If you mean that you mount a sub-tree of the cgroup, this will not work because Systemd requires the paths in |
crosbymichael
commented
Jul 9, 2015
@mrunalp i would vote we don't have this as a default yet since there are so many ways of doing it. @alban the paths for /proc/$PID/cgroup and /sys/fs/cgroup is a good argument for not doing this but I don't think much in that linked document apply because their recommendations are very insecure just make systemd work they way they want it to work. |
mrunalp
commented
Jul 9, 2015
@crosbymichael I agree. |
philips
commented
Jul 9, 2015
@crosbymichael It seems like we should finish this discussion about sub-tree vs. non-subtree mapping and if we need to define an environment variable. I am fine saying the cgroup tree is RO, for now, but I would like to figure this tree stuff out here for @mrunalp's use case of a process wanting to know its own cgroups. |
philips
commented
Jul 9, 2015
@mrunalp Maybe you could open an issue for discussion? |
Signed-off-by: Mrunal Patel mrunalp@gmail.com