[lxc-devel] [lxc/master] start containers in foreground when using the lxc at .service

evgeni on Github lxc-bot at linuxcontainers.org
Thu Jun 2 13:42:42 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 653 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160602/de7eab32/attachment.bin>
-------------- next part --------------
From c4e50f1d41277ce3be2807b6ea24e68cb33bcb20 Mon Sep 17 00:00:00 2001
From: Evgeni Golov <evgeni at golov.de>
Date: Thu, 2 Jun 2016 15:38:47 +0200
Subject: [PATCH] start containers in foreground when using the lxc at .service

lxc-start started to default to daemonize the container when starting
this conflicts with type=simple of the systemd unit

call lxc-start with -F and thus force execution in foreground
that way we can feed the log to journald properly and keep type=simple

Debian-Bug: https://bugs.debian.org/826100
Signed-off-by: Evgeni Golov <evgeni at golov.de>
---
 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 190280e..ba8cc1b 100644
--- a/config/init/systemd/lxc at .service.in
+++ b/config/init/systemd/lxc at .service.in
@@ -9,7 +9,7 @@ Type=simple
 KillMode=mixed
 KillSignal=SIGPWR
 TimeoutStopSec=120s
-ExecStart=@BINDIR@/lxc-start -n %i
+ExecStart=@BINDIR@/lxc-start -F -n %i
 # Environment=BOOTUP=serial
 # Environment=CONSOLETYPE=serial
 Delegate=yes


More information about the lxc-devel mailing list