[lxc-devel] cgroup-bin

Taisuke Yamada tai at rakugaki.org
Mon Jun 13 10:05:53 UTC 2011


I don't think that works.

IIRC, current lxc code requires all cgroups to belong in same
cgroup folder. It expects cgroups folder hierarchy to be in following format:

    /cgroupmountpointroot/<pid-renamed-to-container-name>/<namespace>/...

I'm not sure exact cause of the issue you had with first configuration, but
last time I tried, I did

  mount {
        all = /sys/fs/cgroup;
  }

to have everything under single cgroup mountpoint.

# IMHO, cgroups interface is so flexible that it's complex to follow
all kinds of
# cgroups configuration. It might be better to use libcg API instead (though
# I don't know how mature that is).

> Thanks to you for helpful advice, I have tried but unsuccessful, and here I
> explain why:
>
> In addition and to correct the fix (the link below) I can say that my
> /etc/cgconfig.conf on Ubuntu/natty looked like this
>
> mount {
>
> cpu = /sys/fs/cgroup/cpu;
>
> cpuacct = /sys/fs/cgroup/cpuacct;
>
> devices = /sys/fs/cgroup/devices;
>
> memory = /sys/fs/cgroup/memory;
>
> freezer = /sys/fs/cgroup/freezer;
>
> blkio = /sys/fs/cgroup/blkio;
>
> }
>
> and this does not work with the CREATE_DEFAULT=no fix because lxc looks for
> devices.deny in a cpu mount (unrelated to /sys/fs it is or simply /), so I
> have changed cpu mount to this
>
> mount {
>
> devices = /sys/fs/cgroup/devices; # just moved devices on to first pos
>
> memory = /sys/fs/cgroup/memory;
>
> freezer = /sys/fs/cgroup/freezer;
>
> blkio = /sys/fs/cgroup/blkio;
>
> cpu = /sys/fs/cgroup/cpu;
>
> cpuacct = /sys/fs/cgroup/cpuacct;
>
> }
>
> and lxc started (with cgroups created under /sys/fs) all my containers
> successfully and they work now fine for me.
>
> It seems that lxc looks for any first (and not others) mount for
> devices.deny?
>
> # dpkg -l lxc cgroup-bin
>
> ii cgroup-bin 0.37.1-1ubuntu2
>
> ii lxc 0.7.4.1-0ubuntu0~dnjl1~natty0
>
>> Sounds like you're hit by following bug?
>
>>
>
>> - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588494#13
>
>>
>
>> I'm on Debian, but after above fix, I was able to make lxc and
>
>> cgroups-bin coexist.
>
>>
>
>> > I use lxc on Ubuntu, and tried cgroup-bin package along with lxc. It
>




More information about the lxc-devel mailing list