]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
scripts/autobuilder-worker-prereq-tests: add additional limit testing
authorMichael Halstead <mhalstead@linuxfoundation.org>
Wed, 11 May 2022 18:52:53 +0000 (11:52 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 11 May 2022 18:59:42 +0000 (19:59 +0100)
Check that open file and user process limits are greater than or equal to what
the autobuilder uses.

Signed-off-by: Michael Halstead <mhalstead@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/autobuilder-worker-prereq-tests

index 3956349b30459555f7db4a5333572e2513b979d7..572227dccd169a80d31e79614bde756689355714 100755 (executable)
@@ -51,6 +51,21 @@ if (( $WATCHES < 65000 )); then
     echo 'Need to increase watches (echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf'
     exit 1
 fi
+OPEN_FILES=$(ulimit -n)
+if (( $OPEN_FILES < 65535 )); then
+    echo 'Increase maximum open files in /etc/security/limits.conf'
+    echo '*            soft    nofile           131072'
+    echo '*            hard    nofile           131072'
+    exit 1
+fi
+MAX_PROCESSES=$(ulimit -u)
+if (( $MAX_PROCESSES < 514542 )); then
+    echo 'Increase maximum user processes in /etc/security/limits.conf'
+    echo '*            hard    nproc           515294'
+    echo '*            soft    nproc           514543'
+    exit 1
+fi
+
 mkdir -p tmp/deploy/images/qemux86-64
 pushd tmp/deploy/images/qemux86-64
 if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then