Skip to content

fix: don't abort kind-dev-env.sh on macOS when PROM_ENABLED=true#1645

Closed
sudoalok wants to merge 1 commit into
llm-d:mainfrom
sudoalok:fix/inotify-check-macos-1640
Closed

fix: don't abort kind-dev-env.sh on macOS when PROM_ENABLED=true#1645
sudoalok wants to merge 1 commit into
llm-d:mainfrom
sudoalok:fix/inotify-check-macos-1640

Conversation

@sudoalok

Copy link
Copy Markdown
Contributor

What this does

Stops PROM_ENABLED=true make env-dev-kind from aborting on macOS.

The Prometheus pre-flight check in scripts/kind-dev-env.sh reads
/proc/sys/fs/inotify/max_user_instances, a Linux-only path. On macOS that
read fails and, under set -eo pipefail, the failed cat kills the whole
script before the cluster is ever created.

This falls back to a passing value when the path is absent, so the host-side
check degrades gracefully off-Linux. On Linux the behavior is unchanged.

 if [ "${PROM_ENABLED}" == "true" ]; then
-  INOTIFY_INSTANCES=$(cat /proc/sys/fs/inotify/max_user_instances)
+  INOTIFY_INSTANCES=$(cat /proc/sys/fs/inotify/max_user_instances 2>/dev/null || echo 512)

@sudoalok
sudoalok requested a review from a team as a code owner June 13, 2026 17:34
@sudoalok
sudoalok requested review from ahg-g and liu-cong June 13, 2026 17:34
@github-actions github-actions Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 13, 2026
The PROM_ENABLED pre-flight check reads /proc/sys/fs/inotify/max_user_instances, which only exists on Linux. On macOS the failed read aborts make env-dev-kind under set -eo pipefail before the cluster is created. Fall back to a passing value when the path is absent so the check degrades gracefully off-Linux; behavior on Linux is unchanged.

Signed-off-by: Alok Behera <alokbeherak061@gmail.com>
@sudoalok
sudoalok force-pushed the fix/inotify-check-macos-1640 branch from 14dc0df to 1fcb67b Compare June 22, 2026 13:09
@elevran

elevran commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

@sudoalok please fix the conflict

@sudoalok

sudoalok commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

thanks @elevran - looks like this was superseded. #1654 already merged the same macOS fix on main (guards the /proc read with -r plus a node-side check for the VM case), which covers what this PR did and more. nothing left for this one to add, so closing as superseded by #1654

@elevran

elevran commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

closing as superseded by #1654

@elevran elevran closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants