[lxc-users] lxc-autostart, systemd and cgroups

Fajar A. Nugraha list at fajar.net
Wed Jan 20 22:57:54 UTC 2016


Yep. I don't know when it was fixed, but my test system works fine. This is
after a reboot:

root at debian:~# lxc-ls -f
NAME  STATE    IPV4        IPV6  GROUPS  AUTOSTART
--------------------------------------------------
c1    RUNNING  10.0.3.194  -     -       YES

root at debian:~# lxc-attach -n c1 -- cat /proc/self/cgroup
8:cpuset:/lxc/c1
7:cpu,cpuacct:/lxc/c1
6:devices:/lxc/c1
5:net_cls,net_prio:/lxc/c1
4:freezer:/lxc/c1
3:perf_event:/lxc/c1
2:blkio:/lxc/c1
1:name=systemd:/lxc/c1

I also updated manually to a newer version of systemd though, but it
shouldn't matter in this case
root at debian:~# dpkg -l systemd lxc lxcfs
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                       Version
 Architecture               Description
+++-==========================================-==========================-==========================-=========================================================================================
ii  lxc                                        1:1.1.5-0ubuntu2+debian1~j
amd64                      Linux Containers userspace tools
ii  lxcfs                                      0.10-0ubuntu2+debian1~jess
amd64                      FUSE based filesystem for LXC
ii  systemd                                    225-1ubuntu9+jessie1
amd64                      system and service manager


On Thu, Jan 21, 2016 at 3:01 AM, Neil Greenwood <neil.greenwood at gmail.com>
wrote:

> That looks like an old version of LXC. Try upgrading to a newer version,
> maybe build one from source.
>
> Neil.
>
> On 20 January 2016 18:54:44 GMT+00:00, Carlos Alberto Lopez Perez <
> clopez at igalia.com> wrote:
>
>> On 20/01/16 19:20, Carlos Alberto Lopez Perez wrote:
>>
>>>
>>>  After more testing, this only seems reproducible when booting.
>>>
>>>
>> And is not a race condition (I thought that maybe the cgroup fs were not
>> mounted when lxc-autostart-helper was executed).
>>
>> So, I have tested to put a sleep of 30 seconds in lxc-autostart-helper
>> (which is what the systemd lxc unit calls) and to print the currently
>> mounted cgroups when the unit was called.
>>
>> All cgroups were mounted as expected when that script was called, and
>> the 30 seconds sleep didn't helped.
>>
>> So, is something else....
>>
>> Any ideas?
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160121/c1591a3b/attachment.html>


More information about the lxc-users mailing list