This can be used to avoid instability in LXCFS when running on RHEL 7 hosts.
Signed-off-by: tomponline <tomp@tomp.uk>
#!/bin/sh -e
+# Parse command flags
+while [ ! $# -eq 0 ]
+do
+ case "$1" in
+ --skip-cgroup-mounts )
+ SKIP_CGROUP_MOUNTS=1
+ ;;
+ esac
+ shift
+done
+
# We're dealing with mount entries, so expand any symlink
LXC_ROOTFS_MOUNT=$(readlink -f ${LXC_ROOTFS_MOUNT})
exit 0
fi
+# Skip mounting cgroup tree if requested.
+if [ "${SKIP_CGROUP_MOUNTS}" == "1" ]; then
+ exit 0
+fi
+
# /sys/fs/cgroup files
if [ -d "${LXC_ROOTFS_MOUNT}/sys/fs/cgroup" ]; then
if [ -d @LXCFSTARGETDIR@/cgroup ]; then