Bug#943981: Proposal: Switch to cgroupv2 by default

Ryutaroh Matsumoto ryutaroh at ict.e.titech.ac.jp
Tue Apr 21 14:40:30 BST 2020


> Do you have any idea what's going wrong?

At the end of your attached log, we have

lxc-start autopkgtest-sid 20200421123647.929 NOTICE   start - start.c:start:2041 - Exec'ing "/sbin/init"
lxc-start autopkgtest-sid 20200421123647.929 NOTICE   start - start.c:post_start:2052 - Started "/sbin/init" with pid "2749"
lxc-start autopkgtest-sid 20200421123647.929 NOTICE   start - start.c:signal_handler:393 - Received 17 from pid 2747 instead of container init 2749
lxc-start autopkgtest-sid 20200421123647.936 DEBUG    start - start.c:signal_handler:411 - Container init process 2749 exited
lxc-start autopkgtest-sid 20200421123647.936 INFO     error - error.c:lxc_error_set_and_log:28 - Child <2749> ended on error (255)

This seems to indicate that /sbin/init exited immediately after the container was started.
I do not see such messages when I ran the same command.

Could you run lxc-start -F -n autopkgtest-sid with -F?
It may show error messages from /sbin/init in the container.

My guess is that /var/lib/lxc/autopkgtest-sid/config needs
lxc.init.cmd = /sbin/init systemd.unified_cgroup_hierarchy=1
(or alternatively lxc.mount.auto = cgroup:rw:force).
In my Debian, lxc.init.cmd in /var/lib/lxc/autopkgtest-unstable-amd64/config
was copied from /etc/lxc/default.conf when I ran "debci setup",
which ran "lxc-create -t debian" as its child process,
which copies /etc/lxc/default.conf into the container config.

IMHO it seems a design flaw in LXC which needs different
container config depending on the host cgroup hierarchy...

Best regards, Ryutaroh



More information about the Pkg-systemd-maintainers mailing list