-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Cgroups mount fix #130
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
Cgroups mount fix #130
Conversation
Signed-off-by: Alexander Morozov <[email protected]>
Signed-off-by: Alexander Morozov <[email protected]>
@@ -180,18 +180,22 @@ func mountToRootfs(m *configs.Mount, rootfs, mountLabel string) error { | |||
if err != nil { | |||
return err | |||
} | |||
relDir, err := filepath.Rel(mm.Root, dir) |
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.
If I am reading the code correctly, this doesn't have any effect unless we are planning to set Root to something else.
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 understand. Can you elaborate?
It seems like this mm.Root
always prepended to cgroup path in /proc/self/cgroup
For example if I'm in parent container, I have mm.Root
like
/system.slice/docker-bae3c1be58e13929aa6ae2f10ec958e5e27e9a4fb178f256e229c5bc54212d66.scope
and in new container after creation will be in /proc/self/cgroup
something like:
/system.slice/docker-bae3c1be58e13929aa6ae2f10ec958e5e27e9a4fb178f256e229c5bc54212d66.scope/docker/ID
I'll retry now though
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 tried to print stuff and it looks exactly like I described. Mountpoints in container somehow became pretty weird, like:
cope/docker/8cccc84d71a08a64948c297f7117b777e69fc337b75f2df3fa78c1515f908933
Maybe I did logical mistake somewhere, or maybe it is expected.
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.
@LK4D4 Ack, I will test out more from within a docker container.
LGTM |
Fix LinuxRuntime field
Because of this there was problems with mounting cgroups in children containers. It tried to mount whole path, which exists on host, but not in container.
ping @mrunalp @hqhq @avagin