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

Mounting of /sys/fs/cgroup is not necessary in Docker backend. #1248

Open
jieyu opened this issue Jul 27, 2018 · 6 comments
Open

Mounting of /sys/fs/cgroup is not necessary in Docker backend. #1248

jieyu opened this issue Jul 27, 2018 · 6 comments

Comments

@jieyu
Copy link
Contributor

jieyu commented Jul 27, 2018

This allows each dc/os container to see the host cgroups. For the sake of isolation, this is not the ideal way. I don't see a reason why /sys/fs/cgroup needs to be bind mounted into the DC/OS container.

By default, in privileged mode, Docker gives you write access to the cgroup of the container itself.

There might be some tweak needed to make Mesos agent happy. This is definitely doable.

@adamtheturtle
Copy link
Contributor

FWIW I also don't know why this is there and it comes from the port of DC/OS Docker - see https://github.com/dcos/dcos-docker/blob/feed8d98a88262b7023c0ed98f454644360318aa/Makefile#L58.

@adamtheturtle
Copy link
Contributor

This is the original commit which added the mounting - mesosphere-backup/dcos-docker@bb56822. We have no context except the commit message "mount systemd all the things".

@adamtheturtle
Copy link
Contributor

The comment by the code is "# Mount cgroups into agents for Mesos DRF." from @timaa2k . Any thoughts on whether removing this would be an issue @jieyu or how to maybe get around it?

Prompted by @vishnu2kmohan 's comment "Just wanted to let you know that it doesn't work on non-systemd distributions like Gentoo with OpenRC and I need to fake mount the systemd cgroup on my machine, just to get started."

@adamtheturtle
Copy link
Contributor

I removed the mount in #1601 - let's see if this comes back to bite us! At least if it does we will know why we had this mount.

@adamtheturtle
Copy link
Contributor

When we remove the mount, and do no tinkering, we see the following when attempting to deploy Kafka.

Feb 14 15:13:40 dcos-e2e-default-4d773-agent-2 mesos-agent[1873]: E0214 15:13:40.545511  1882 cgroups.cpp:712] Failed to assign container cd4b727a-885d-4674-9f8b-8c3c39aa8d81 pid 2850 to cgroup at '/sys/fs/cgroup/cpuset/docker/6c77bd70585c35ba8c7ccdd785f15278d29fbc2a025616a5359df66f3f24e7cb/mesos/cd4b727a-885d-4674-9f8b-8c3c39aa8d81': No space left on device

@jieyu , @Gilbert88 - any ideas what tinkering we need to do.

@adamtheturtle
Copy link
Contributor

Because of the above, @mhrabovcin and I added "Mount cgroups by default, adding an option to not mount #1611". We would like to be able to offer users an option to not mount /sys/fs/cgroups while allowing them to deploy applications such as Kafka.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants