Skip to content

Commit

Permalink
fix: check for inotify limits on linux for quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
abangser committed Dec 2, 2024
1 parent 65a7469 commit 278b01e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/quick-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ verify_prerequisites() {
success_mark
fi

if [[ $(uname) == "Linux" ]]; then
log -n "Confirming Linux inotify limits are sufficient..."
[ $(sysctl -n fs.inotify.max_user_watches) -ge 524288 ]
max_user_watches=$?
[ $(sysctl -n fs.inotify.max_user_instances) -ge 512 ]
max_user_instances=$?
if ! [ $((max_user_watches + max_user_instances)) -eq 0 ]; then
error "Kind requires higher limits, please see: https://kind.sigs.k8s.io/docs/user/known-issues/#pod-errors-due-to-too-many-open-files"
exit_code=1
else
success_mark
fi
fi

if [[ exit_code -gt 0 ]]; then
log "\nPlease confirm you have the above prerequisites before re-running this script"
exit $((exit_code))
Expand Down

0 comments on commit 278b01e

Please sign in to comment.