From d13ee64403a3e7860f9bfa76db48abeb346f3b08 Mon Sep 17 00:00:00 2001 From: Derek Nola Date: Wed, 29 Mar 2023 09:55:08 -0700 Subject: [PATCH] Enhance `k3s check-config` (#7091) * Move CONFIG_CGROUP_PIDS to Required Signed-off-by: Derek Nola --- contrib/util/check-config.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/contrib/util/check-config.sh b/contrib/util/check-config.sh index eda07bc238..24f3e3585b 100755 --- a/contrib/util/check-config.sh +++ b/contrib/util/check-config.sh @@ -177,8 +177,15 @@ echo if [ -s .links ]; then while read file link; do if [ "$(readlink $file)" != "$link" ]; then - wrap_bad '- links' "$file should link to $link" - linkFail=1 + # If no iptables is installed on the host system, the symlink will be different + if [ "$(readlink $file)" = "xtables-legacy-multi" ]; then + wrap_warn "- $file" "symlink to xtables-legacy-multi" + elif [ "$(readlink $file)" = "xtables-nft-multi" ]; then + wrap_warn "- $file" "symlink to xtables-nft-multi" + else + wrap_bad "- $file" "symlink to $link" + linkFail=1 + fi fi done <.links if [ $linkFail -eq 0 ]; then @@ -374,7 +381,7 @@ fi flags=" NAMESPACES NET_NS PID_NS IPC_NS UTS_NS - CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS MEMCG + CGROUPS CGROUP_PIDS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS MEMCG KEYS VETH BRIDGE BRIDGE_NETFILTER IP_NF_FILTER IP_NF_TARGET_MASQUERADE @@ -398,9 +405,6 @@ echo 'Optional Features:' { check_flags SECCOMP } -{ - check_flags CGROUP_PIDS -} # { # check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED # if [ -e /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes ]; then