mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Updated check_config
Signed-off-by: gunadhya <6939749+gunadhya@users.noreply.github.com> Added cgroupv2 controller check Modified comment
This commit is contained in:
parent
5e4da6cc82
commit
aff02dbcaf
1 changed files with 18 additions and 0 deletions
|
@ -162,6 +162,20 @@ echo 'Generally Necessary:'
|
|||
printf -- '- '
|
||||
if [ "$(stat -f -c %t /sys/fs/cgroup 2> /dev/null)" = '63677270' ]; then
|
||||
wrap_good 'cgroup hierarchy' 'cgroupv2'
|
||||
cgroupv2ControllerFile='/sys/fs/cgroup/cgroup.controllers'
|
||||
if [ -f "$cgroupv2ControllerFile" ]; then
|
||||
echo ' Controllers:'
|
||||
for controller in cpu cpuset io memory pids; do
|
||||
if grep -qE '(^| )'"$controller"'($| )' "$cgroupv2ControllerFile"; then
|
||||
echo " - $(wrap_good "$controller" 'available')"
|
||||
else
|
||||
echo " - $(wrap_bad "$controller" 'missing')"
|
||||
fi
|
||||
done
|
||||
else
|
||||
wrap_bad "$cgroupv2ControllerFile" 'nonexistent??'
|
||||
fi
|
||||
# TODO find an efficient way to check if cgroup.freeze exists in subdir
|
||||
else
|
||||
cgroupSubsystemDir="$(sed -rne '/^[^ ]+ ([^ ]+) cgroup ([^ ]*,)?(cpu|cpuacct|cpuset|devices|freezer|memory)[, ].*$/ { s//\1/p; q }' /proc/mounts)"
|
||||
cgroupDir="$(dirname "$cgroupSubsystemDir")"
|
||||
|
@ -221,6 +235,10 @@ fi
|
|||
if [ "$kernelMajor" -lt 5 ] || [ "$kernelMajor" -eq 5 -a "$kernelMinor" -le 2 ]; then
|
||||
check_flags NF_NAT_NEEDED
|
||||
fi
|
||||
# check availability of BPF_CGROUP_DEVICE support
|
||||
if [ "$kernelMajor" -ge 5 ] || ([ "$kernelMajor" -eq 4 ] && [ "$kernelMinor" -ge 15 ]); then
|
||||
check_flags CGROUP_BPF
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
|
|
Loading…
Reference in a new issue