[lxc-devel] [lxc/master] Use lxc-stop to stop systemd service

decomposite on Github lxc-bot at linuxcontainers.org
Wed May 31 16:45:44 UTC 2017


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 532 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20170531/54cc9853/attachment.bin>
-------------- next part --------------
From 0870d6f5780a3bb2d47e8058f3a93648b9b05378 Mon Sep 17 00:00:00 2001
From: JD Friedrikson <yours at decompo.site>
Date: Wed, 31 May 2017 12:41:41 -0400
Subject: [PATCH] Use lxc-stop to stop systemd service

Ever since 330ae3d, systemd has not been able to cleanly stop lxc
containers (via lxc@) because it's still using SIGPWR for systemd-based
containers.

We should now use the nice logic in 330ae3d to stop the containers
instead.
---
 config/init/systemd/lxc at .service.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/init/systemd/lxc at .service.in b/config/init/systemd/lxc at .service.in
index 44d11e8ec..a2aa2211f 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


More information about the lxc-devel mailing list