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

Dwight Engen dwight.engen at oracle.com
Mon Mar 24 21:20:11 UTC 2014


On Mon, 24 Mar 2014 14:26:10 -0500
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?

Not that I'm aware of or noticed, I just mentioned it because its what
I ended up doing to get cgmanager working on my systemd machine.

 _______________________________________________
> 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