From: Michael Adam Date: Fri, 2 Jan 2015 20:12:21 +0000 (+0100) Subject: lxc-fedora: when using systemd, set lxc.kmsg = 0 in the config X-Git-Tag: lxc-1.1.0.rc1~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b75ee4747c5f26c52cfb6127b6420f38f4fba88;p=thirdparty%2Flxc.git lxc-fedora: when using systemd, set lxc.kmsg = 0 in the config This is to prevent systemd-journald to enter a 100% cpu loop. Signed-off-by: Michael Adam Acked-by: Serge E. Hallyn --- diff --git a/templates/lxc-fedora.in b/templates/lxc-fedora.in index 65e99598c..2296de411 100644 --- a/templates/lxc-fedora.in +++ b/templates/lxc-fedora.in @@ -1083,13 +1083,22 @@ lxc.include = @LXCTEMPLATECONFIG@/fedora.common.conf " >> $config_path/config fi + if [ "x$have_systemd" = "x1" ]; then + cat <> $config_path/config +lxc.autodev = 1 +lxc.kmsg = 0 +EOF + else + cat <> $config_path/config +lxc.autodev = 0 +EOF + fi + # Append things which require expansion here... cat <> $config_path/config lxc.arch = $arch lxc.utsname = $utsname -lxc.autodev = $auto_dev - # When using LXC with apparmor, uncomment the next line to run unconfined: #lxc.aa_profile = unconfined @@ -1303,12 +1312,12 @@ if [ -z "$release" ]; then fi fi -# Fedora 15 and above run systemd. We need autodev enabled to keep +# Fedora 15 and above run systemd.We need autodev enabled to keep # systemd from causing problems. +# Also, kmsg must not be mapped to prevent a 100% cpu loop +# in systemd-journald. if [ $release -gt 14 ]; then - auto_dev="1" -else - auto_dev="0" + have_systemd="1" fi if [ "$(id -u)" != "0" ]; then