1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Begin a section in the check-config script to check limits

Initially this checks the kernel's maxkeys setting which is
low in some older distribution kernels, such that only 200 containers
can be created, reported in #22865.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
Justin Cormack 2016-05-20 16:05:25 -07:00
parent 52debcd58a
commit 4e2d98761d

View file

@ -275,3 +275,16 @@ echo '- Storage Drivers:'
} | sed 's/^/ /' } | sed 's/^/ /'
echo echo
check_limit_over()
{
if [ $(cat "$1") -le "$2" ]; then
wrap_bad "- $1" "$(cat $1)"
wrap_color " This should be set to at least $2, for example set: sysctl -w kernel/keys/root_maxkeys=1000000" bold black
else
wrap_good "- $1" "$(cat $1)"
fi
}
echo 'Limits:'
check_limit_over /proc/sys/kernel/keys/root_maxkeys 10000
echo