[pkg-lxc-devel] Bug#863850: systemd service file does not stop systemd-based containers
JD Friedrikson
me at jdfriedrikson.me
Wed May 31 23:10:01 UTC 2017
Package: lxc
Version: 1:2.0.7-2
Hello,
Debian's packaged version of LXC currently is not able to stop systemd-based containers as they have not responded to SIGPWR as of https://github.com/lxc/lxc/commit/8eb62c245e9b67b451ba0766f3ecd7c6f2081d73 .
The appropriate way to stop systemd via a signal is to use SIGRTMIN+3 (or, I think, SIGRTMIN+4). The lxc-stop binary automatically determines whether the container will respond to this signal and handles it appropriately. Therefore, we should use that binary with ExecStop instead of using a signal (in the service file).
This has already been fixed upstream:
https://github.com/lxc/lxc/commit/c08d29b6d134fbb94d2cff0454ce27eb66930c4d
It would be cool if we could package this fix before the release. Here's a patch:
"""
diff --git a/config/init/systemd/lxc at .service.in b/config/init/systemd/lxc at .service.in
index 44d11e8e..a2aa2211 100644
--- a/config/init/systemd/lxc at .service.in
+++ b/config/init/systemd/lxc at .service.in
@@ -8,9 +8,9 @@ Documentation=man:lxc-start man:lxc
[Service]
Type=simple
KillMode=mixed
-KillSignal=SIGPWR
TimeoutStopSec=120s
ExecStart=@BINDIR@/lxc-start -F -n %i
+ExecStop=@BINDIR@/lxc-stop -n %i
# Environment=BOOTUP=serial
# Environment=CONSOLETYPE=serial
Delegate=yes
--
2.13.0
"""
Please let me know if you need anything more from me.
Cheers,
JD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-lxc-devel/attachments/20170531/ac923271/attachment.html>
More information about the Pkg-lxc-devel
mailing list