<!DOCTYPE html>
<html><head>
    <meta charset="UTF-8">
</head><body><p>Package: lxc<br>Version: 1:2.0.7-2<br></p><p>Hello,<br></p><p>Debian's packaged version of LXC currently is not able to stop systemd-based containers as they have not responded to SIGPWR as of <a href="https://github.com/lxc/lxc/commit/8eb62c245e9b67b451ba0766f3ecd7c6f2081d73">https://github.com/lxc/lxc/commit/8eb62c245e9b67b451ba0766f3ecd7c6f2081d73</a> .<br></p><p>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).<br></p><p>This has already been fixed upstream:<br></p><p>https://github.com/lxc/lxc/commit/c08d29b6d134fbb94d2cff0454ce27eb66930c4d</p><p>It would be cool if we could package this fix before the release. Here's a patch:<br></p><p>"""<br></p><p>diff --git a/config/init/systemd/lxc@.service.in b/config/init/systemd/lxc@.service.in<br>index 44d11e8e..a2aa2211 100644<br>--- a/config/init/systemd/lxc@.service.in<br>+++ b/config/init/systemd/lxc@.service.in<br>@@ -8,9 +8,9 @@ Documentation=man:lxc-start man:lxc<br> [Service]<br> Type=simple<br> KillMode=mixed<br>-KillSignal=SIGPWR<br> TimeoutStopSec=120s<br> ExecStart=@BINDIR@/lxc-start -F -n %i<br>+ExecStop=@BINDIR@/lxc-stop -n %i<br> # Environment=BOOTUP=serial<br> # Environment=CONSOLETYPE=serial<br> Delegate=yes<br>-- <br>2.13.0<br></p><p>"""<br></p><p>Please let me know if you need anything more from me.<br></p><p>Cheers,<br>JD<br></p></body></html>