Skip to content

Commit d13ee64

Browse files
authored
Enhance k3s check-config (k3s-io#7091)
* Move CONFIG_CGROUP_PIDS to Required Signed-off-by: Derek Nola <[email protected]>
1 parent 01ea3ff commit d13ee64

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

contrib/util/check-config.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,15 @@ echo
177177
if [ -s .links ]; then
178178
while read file link; do
179179
if [ "$(readlink $file)" != "$link" ]; then
180-
wrap_bad '- links' "$file should link to $link"
181-
linkFail=1
180+
# If no iptables is installed on the host system, the symlink will be different
181+
if [ "$(readlink $file)" = "xtables-legacy-multi" ]; then
182+
wrap_warn "- $file" "symlink to xtables-legacy-multi"
183+
elif [ "$(readlink $file)" = "xtables-nft-multi" ]; then
184+
wrap_warn "- $file" "symlink to xtables-nft-multi"
185+
else
186+
wrap_bad "- $file" "symlink to $link"
187+
linkFail=1
188+
fi
182189
fi
183190
done <.links
184191
if [ $linkFail -eq 0 ]; then
@@ -374,7 +381,7 @@ fi
374381

375382
flags="
376383
NAMESPACES NET_NS PID_NS IPC_NS UTS_NS
377-
CGROUPS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS MEMCG
384+
CGROUPS CGROUP_PIDS CGROUP_CPUACCT CGROUP_DEVICE CGROUP_FREEZER CGROUP_SCHED CPUSETS MEMCG
378385
KEYS
379386
VETH BRIDGE BRIDGE_NETFILTER
380387
IP_NF_FILTER IP_NF_TARGET_MASQUERADE
@@ -398,9 +405,6 @@ echo 'Optional Features:'
398405
{
399406
check_flags SECCOMP
400407
}
401-
{
402-
check_flags CGROUP_PIDS
403-
}
404408
# {
405409
# check_flags MEMCG_SWAP MEMCG_SWAP_ENABLED
406410
# if [ -e /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes ]; then

0 commit comments

Comments
 (0)