[lxc-users] lxc 2.0.7: sysvinit on the host breaks systemd based containers
Fajar A. Nugraha
list at fajar.net
Thu May 18 08:27:31 UTC 2017
On Thu, May 18, 2017 at 3:04 PM, Harald Dunkel <harald.dunkel at aixigo.de>
wrote:
> On 05/16/17 13:09, Harald Dunkel wrote:
> >
> > I did serveral tests with LXC 2.0.8 on the host and systemd on the
> > client: Both systemd 215-17+deb8u7 (Debian 8) and systemd 230-7~bpo8+2
> > (Debian 8 backport) show this problem. cgroupfs-mount 1.3 is installed.
> >
> > If I ditch LXC 2.x and cgroupfs-mount and use LXC 1.1.5 and /cgroup
> > instead, then the same systemd-based container boots without problems.
> >
> > If I install cgroupfs-mount again, then the systemd-based container
> > still works.
> >
> > If I remove /cgroup from /etc/fstab (still using cgroupfs-mount), then
> > the systemd-based container still works.
> >
> > Of course the host was rebooted between each of these steps. Obviously
> > the old lxc 1.1.5 is more stable here.
> >
>
> PS:
>
> cgmanager and systemd-shim (whatever that is) were not installed,
> either. Installing cgmanager seems to resolve the problem. Its not
> in lxc's dependency list, but I wonder if this tool is a must-have?
>
>
>
I have a centos6 (upstart) with an old lxc-2.0.0.rc5 (don't ask). It can
run systemd containers just fine. The requirement is that systemd cgroup
must be mounted. On that system, I use libcgroup, and have this entry on
/etc/cgconfig.conf
mount {
cpuset = /sys/fs/cgroup/cpuset;
cpu = /sys/fs/cgroup/cpu;
cpuacct = /sys/fs/cgroup/cpuacct;
memory = /sys/fs/cgroup/memory;
devices = /sys/fs/cgroup/devices;
freezer = /sys/fs/cgroup/freezer;
net_cls = /sys/fs/cgroup/net_cls;
blkio = /sys/fs/cgroup/blkio;
pids = /sys/fs/cgroup/pids;
perf_event = /sys/fs/cgroup/perf_event;
"name=systemd" = /sys/fs/cgroup/systemd;
}
group . {
cpuset {cgroup.clone_children=1;}
cpu {cgroup.clone_children=1;}
cpuacct {cgroup.clone_children=1;}
memory {
cgroup.clone_children=1;
memory.use_hierarchy=1;
}
freezer {cgroup.clone_children=1;}
net_cls {cgroup.clone_children=1;}
blkio {cgroup.clone_children=1;}
pids {cgroup.clone_children=1;}
perf_event {cgroup.clone_children=1;}
"name=systemd" {cgroup.clone_children=1;}
}
So I believe your system might work even without cgmanager, as long as you
have systemd cgroup mounted on the host.
--
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170518/83e2513a/attachment.html>
More information about the lxc-users
mailing list