Commit Graph

14 Commits

Author SHA1 Message Date
Rowan Thorpe
dccee4e87b Fix regression from commit 137e80cd86
Problem:

A false-negative in check-config.sh for cgroups v2 systems was fixed but the
commit introduced a regression based on a small assumption that content of
/sys/fs/cgroup/cgroup.controllers would have the same format as the content
of /proc/self/cgroup. It doesn't.

Solution:

This just tweaks the regex to count occurrences of either cgroup
subsystem-names on each line (as occurs in the sysfs pseudo-file), or those
names with colons either side (as occurs in the procfs pseudo-file).

Signed-off-by: Rowan Thorpe <rowan@rowanthorpe.com>
2021-09-17 11:21:17 -07:00
Rowan Thorpe
137e80cd86 Handle cgroup v1/2/hybrid in check-config.sh more explicitly/accurately
Problem:
 In check-config.sh assumptions are made about cgroups v1/v2/hybrid,
 causes false-negative on pure V2 system.

Solution:
 In check-config.sh implement the same validation as found in
 ./pkg/agent/run.go -> validate(), validateCgroupsV1(), validateCgroupsV2()
 [ which use containerd/cgroups:utils.go -> Mode() ]

Signed-off-by: Rowan Thorpe <rowan@rowanthorpe.com>
2021-09-14 15:53:12 -07:00
Derek Nola
2afa3dbe1c
Changed iptables version check for fail if version is between 1.8.0 and 1.8.3 and using nf_tables mode (#3425)
Signed-off-by: dereknola <derek.nola@suse.com>
2021-06-10 10:47:03 -07:00
Erik Wilson
f6153201ba Add diagnostics collection scripts
Signed-off-by: Erik Wilson <Erik.E.Wilson@gmail.com>
2020-12-07 11:08:47 -07:00
Erik Wilson
7f0bdf8a1e
check-config: Remove NF_NAT_IPV4 and NF_NAT_NEEDED from kernel check 2020-10-06 14:30:49 -07:00
Jean-Philippe Evrard
eabc82c724 Remove trailing whitespaces
To please my OCD, and remove my editor flashing boxes,
I am removing trailing whitespaces. They have no purpose in life.
2020-05-27 17:27:30 +02:00
Erik Wilson
5b98d10e4b Warn if NPC can't start rather than fatal error
If the ip_set kernel module is not available we should warn
that the network policy controller can not start rather than
cause a fatal error.

Also adds module probing and config checks for ip_set.
2020-01-14 14:30:12 -07:00
Erik Wilson
3c945476f6 Revert check-config's "Silence modprobe warnings"
This reverts commit 8edbe30c8c.
2019-11-14 10:56:37 -07:00
Erik Wilson
8edbe30c8c Silence modprobe warnings 2019-11-13 17:39:02 -07:00
Erik Wilson
c83ec56cbe Non-fatal warning for check-config modules 2019-11-13 17:08:15 -07:00
Erik Wilson
7b3a2d33d1 Clean up check-config exit code & text 2019-11-13 14:57:58 -07:00
Erik Wilson
cc4026e1e2 Search system path for iptables in check-config 2019-11-13 12:21:56 -07:00
Erik Wilson
a73f8b1773 Update check-config.sh for k3s 2019-11-13 08:34:24 -07:00
Erik Wilson
b0d1ca9c21 Add check-config.sh from moby 2019-11-13 02:16:16 -07:00