[lxc-users] lxc-autostart, systemd and cgroups
Carlos Alberto Lopez Perez
clopez at igalia.com
Wed Jan 20 18:20:09 UTC 2016
On 20/01/16 18:59, Carlos Alberto Lopez Perez wrote:
> Hello,
>
> I've found that when lxc-autostart is executed via systemd, the cgroups
> assigned to the container are wrong for some control groups.
>
> See the following two examples:
>
> 1. Container started via systemd (/lib/systemd/system/lxc.service unit
> that calls lxc-autostart).
>
> # cat /proc/${pidofsomeprocessinsidethecontainer}/cgroup
> 9:perf_event:/lxc/clopeztest3
> 8:blkio:/
> 7:net_cls,net_prio:/lxc/clopeztest3
> 6:freezer:/lxc/clopeztest3
> 5:devices:/
> 4:memory:/
> 3:cpu,cpuacct:/
> 2:cpuset:/lxc/clopeztest3
> 1:name=systemd:/system.slice/lxc.service
>
>
After more testing, this only seems reproducible when booting.
If I manually execute via ssh:
# systemctl stop lxc
# systemctl start lxc
Then the cgroups assigned to the container are correct:
# cat /proc/${pidofsomeprocessinsidethecontainer}/cgroup
9:perf_event:/lxc/clopeztest3
8:blkio:/lxc/clopeztest3
7:net_cls,net_prio:/lxc/clopeztest3
6:freezer:/lxc/clopeztest3
5:devices:/lxc/clopeztest3
4:memory:/lxc/clopeztest3
3:cpu,cpuacct:/lxc/clopeztest3
2:cpuset:/lxc/clopeztest3
1:name=systemd:/system.slice/lxc.service
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 883 bytes
Desc: OpenPGP digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160120/f5cec5b2/attachment.sig>
More information about the lxc-users
mailing list