From 4e2d98761dc092d232451f5f45c7667a35afa945 Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Fri, 20 May 2016 16:05:25 -0700 Subject: [PATCH] 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 --- contrib/check-config.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/contrib/check-config.sh b/contrib/check-config.sh index bdfda0ca0d..a328e73c61 100755 --- a/contrib/check-config.sh +++ b/contrib/check-config.sh @@ -275,3 +275,16 @@ echo '- Storage Drivers:' } | sed 's/^/ /' 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