[cgmanager-devel] cgmanager fails to start on Fedora (or cgmanager cannot start on distros which run systemd)

Rami Rosen roszenrami at gmail.com
Mon Mar 24 20:38:23 UTC 2014


Hi,
Just  BTW, in the past Tejun Heo posted a patch to deprecate the cpuacct
cgroup controller, so that the CPU cgroup controller will provide all
needed stats.

see: http://lists.linuxfoundation.org/pipermail/containers/2012-September/030347.html

regards,
Rami Rosen
http://ramirose.wix.com/ramirosen


On Mon, Mar 24, 2014 at 9:26 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> Quoting Dwight Engen (dwight.engen at oracle.com):
>> On Mon, 24 Mar 2014 15:28:30 +0200
>> David Shwatrz <dshwatrz at gmail.com> wrote:
>>
>> > Hello, cgmanager-devel,
>> >
>> > When I start cgmanager (built latest from git) on Fedora I get the
>> > following error:
>> > cgmanager: Failed mounting cpuset: Device or resource busy
>> > cgmanager: Error mounting subsystem cpuset
>> > cgmanager: Failed to set up cgroup mounts
>> >
>> > There is no such problem (or any other problem in fact) to run
>> > cgmanager (which is again built latest from git) on Ubuntu.
>> >
>> > I traced down the error to the do_mount_subsys() method in fs.c (of
>> > cgmanager tree), which tries to mount the cpu
>> > cgroup controller.
>> >
>> > The problem is, AFAIK, that cgmanger tries to mount the cpu
>> > controller, which is mounted in the following way
>> >  by systemd (as cat /proc/mounts show):
>> > ...
>> > cgroup /sys/fs/cgroup/cpu,cpuacct cgroup
>> > rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
>> > ...
>> > Now, since the cpu is part of a mask of cgroup
>> > controllers(cpu,cpuacct), as can be seen above, mounting fails, AFAIK.
>> > The
>> > cgroup subsystem does not let mount a controller which is mounted as
>> > part of a mask of controllers on a different path.
>> >
>> > What I mean is that if you look at any other controller which is
>> > mounted as a single controller (not
>> > part of a mask), and try to mount on another path, it will work; for
>> > example, the memory controller
>> > is mounted thus by systemd:
>> > cgroup on /sys/fs/cgroup/memory type cgroup
>> > (rw,nosuid,nodev,noexec,relatime,memory)
>> >
>> > And trying to mount the memory controller under a different path works
>> > successfully:
>> > mount -t cgroup -o memory test /cgroup/memtest/
>> >
>> > From what I understand in the following article,
>> > http://lwn.net/Articles/575672/ ("Another daemon for managing control
>> > groups"),
>> > it seems that systemd does not intend to use cgmanager.
>> >
>> > So the question is (assuming I was correct in what described here
>> > earlier): how can cgmanger run on Fedora and other distros which run
>> > Systemd (in the future, Debian and Ubuntu are also going to use
>> > Systemd).
>>
>> You can tell systemd not to co-mount those controllers by
>> editing /etc/systemd/system.conf and putting JoinControllers= in it. It
>> defaults to co-mounting cpu,cpuacct and net_cls,net_prio
>
> Just to be sure - is there any downside to doing this, other than the
> inconvenience of having to do it?
> _______________________________________________
> cgmanager-devel mailing list
> cgmanager-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/cgmanager-devel


More information about the cgmanager-devel mailing list