With lxc-3.1.0 and kernel 4.14.83-gentoo: Starting an lxc container always reports that it was not started even it was successful. This comes down to these checks in the init script: [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ] eend $? On this system the lxc directory is not present and instead is split into lxc.payload and lxc.monitor. Reproducible: Always
confirmed here. init script is unusable with lxc 3.1
Created attachment 563238 [details] fix using lxc-info Using LXC-INFO instead of looking up the proc dir works. Also, please note the changed -t (time out) value for LXC-STOP. The initial gentoo value of 1 second is to short for maybe large / busy containers. LXC-STOP will anyway return immediately after successful shutdown. The "-t " option adds a timeout and after that, SIGKILL is send to the container.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681c0364b0b3877c811e0db49bf4c55d7103d1cd commit 681c0364b0b3877c811e0db49bf4c55d7103d1cd Author: Alexey Shvetsov <alexxy@gentoo.org> AuthorDate: 2019-04-22 14:48:41 +0000 Commit: Alexey Shvetsov <alexxy@gentoo.org> CommitDate: 2019-04-22 14:48:41 +0000 app-emulation/lxc: Fix init.d Closes: https://bugs.gentoo.org/675540 Package-Manager: Portage-2.3.64, Repoman-2.3.12 Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org> app-emulation/lxc/files/lxc.initd.8 | 131 +++++++++++++++++++++ .../lxc/{lxc-3.1.0.ebuild => lxc-3.1.0-r1.ebuild} | 4 +- 2 files changed, 133 insertions(+), 2 deletions(-)