public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Michael Halstead <mhalstead@linuxfoundation.org>
To: openembedded-core@lists.openembedded.org
Cc: Michael Halstead <mhalstead@linuxfoundation.org>
Subject: [OE-core][PATCH 2/2] scripts/autobuilder-worker-prereq-tests: add additional limit testing
Date: Wed, 11 May 2022 11:52:53 -0700	[thread overview]
Message-ID: <20220511185253.14604-2-mhalstead@linuxfoundation.org> (raw)
In-Reply-To: <20220511185253.14604-1-mhalstead@linuxfoundation.org>

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>
---
 scripts/autobuilder-worker-prereq-tests | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/scripts/autobuilder-worker-prereq-tests b/scripts/autobuilder-worker-prereq-tests
index 3956349b30..572227dccd 100755
--- a/scripts/autobuilder-worker-prereq-tests
+++ b/scripts/autobuilder-worker-prereq-tests
@@ -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
-- 
2.36.1



      reply	other threads:[~2022-05-11 18:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11 18:52 [OE-core][PATCH 1/2] scripts/autobuilder-worker-prereq-tests: update to use yocto 4.0 Michael Halstead
2022-05-11 18:52 ` Michael Halstead [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220511185253.14604-2-mhalstead@linuxfoundation.org \
    --to=mhalstead@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox