The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxcfs/pull/269

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
hooks: Modifies lxc.mount.hook to skip mounting lxcfs cgroup tree when running CentOS 7 on the host.

This is due to instabilities when running lxcfs on CentOS 7 hosts.

/proc mounts do not cause any problems, so those are not skipped.

systemd containers still start OK with cgroup tree not mounted into lxcfs on CentOS 7 hosts.

Signed-off-by: tomponline <[email protected]>

CC @Blub @brauner 
From 059dd49377a341ea99ed05b2171a4d81a0287d59 Mon Sep 17 00:00:00 2001
From: tomponline <[email protected]>
Date: Tue, 22 Jan 2019 12:43:52 +0000
Subject: [PATCH] hooks: Modifies lxc.mount.hook to skip mounting lxcfs cgroup
 tree when running CentOS 7 on the host.

This is due to instabilities when running lxcfs on CentOS 7 hosts.

/proc mounts do not cause any problems, so those are not skipped.

systemd containers still start OK with cgroup tree not mounted into lxcfs on 
CentOS 7 hosts.

Signed-off-by: tomponline <[email protected]>
---
 share/lxc.mount.hook.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/share/lxc.mount.hook.in b/share/lxc.mount.hook.in
index 8fc4748..e418213 100755
--- a/share/lxc.mount.hook.in
+++ b/share/lxc.mount.hook.in
@@ -28,6 +28,15 @@ else
     exit 0
 fi
 
+# Skip mounting cgroup tree on CentOS 7 as causes instability in lxcfs and is 
not needed.
+if [ -f /etc/os-release ]; then
+        . /etc/os-release
+        if [ ${ID} == "centos" ] && [ ${VERSION_ID} == "7" ]; then
+                logger -t lxcfs.mount.hook "Skipping cgroup mounts for CentOS 
7 host"
+                exit 0
+        fi
+fi
+
 # /sys/fs/cgroup files
 if [ -d "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup" ]; then
     if [ -d @LXCFSTARGETDIR@/cgroup ]; then
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to