Skip to content

Conversation

@alban
Copy link
Contributor

@alban alban commented Mar 22, 2018

The OCI runtime spec allows to specify a cgroupns path to enter:
https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#namespaces

Example:

    "namespaces": [
        {
            "type": "cgroup",
            "path": "/proc/1234/ns/cgroup"
        },

Signed-off-by: Alban Crequy [email protected]


Issue found while trying to implement a test for this:
opencontainers/runtime-tools#572 (comment)

The OCI runtime spec allows to specify a cgroupns path to enter:
https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#namespaces

Example:
    "namespaces": [
        {
            "type": "cgroup",
            "path": "/proc/1234/ns/cgroup"
        },

Signed-off-by: Alban Crequy <[email protected]>
@cyphar
Copy link
Member

cyphar commented Mar 22, 2018

Thanks for this, but we're already working on it as part of #1184 (which I'm working on carrying at the moment). In short (you can read the discussion in the thread), the "simple" way of implementing cgroup namespaces doesn't work as you'd expect because you will end up with having the root of the cgroup namespace being the cgroup the process was in before runc put it in a separate cgroup.

I'm closing this as a dup of #1184 (and I am going to carry it in the near future).

@cyphar cyphar closed this Mar 22, 2018
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

Successfully merging this pull request may close these issues.

2 participants