Skip to content

fix: node shell on Bottlerocket hosts#27

Merged
SametKUM merged 1 commit into
mainfrom
fix/node-shell-bottlerocket
Jun 10, 2026
Merged

fix: node shell on Bottlerocket hosts#27
SametKUM merged 1 commit into
mainfrom
fix/node-shell-bottlerocket

Conversation

@SametKUM

Copy link
Copy Markdown
Owner

What

Node shell errored on Bottlerocket OS nodes (exit 127, cryptic Rust-style errors). Root cause: Bottlerocket's host /bin/sh is brush, a sandboxed shell whose allow-list refuses almost every program — even ls — so the --mount host-shell path lands in an unusable jail.

Fix

Branch on the node's OSImage:

  • Bottlerocket — skip --mount and run the helper image's own busybox shell with the host's pid/net/ipc/uts namespaces, starting in /proc/1/root. The live host filesystem and every host process are still reachable; only the shell binary and / come from the helper image.
  • Everything else — unchanged: --mount into the host, prefer host bash, fall back to sh.

Testing

Verified live in wails dev against a Bottlerocket EKS cluster (lands in host:/proc/1/root#, ls/ps work, host processes visible) with no regression on Amazon Linux 2023 EKS or local OrbStack. go test / go vet pass; added TestNodeShellCommand covering both branches.

🤖 Generated with Claude Code

Bottlerocket's host /bin/sh is brush, a sandboxed shell whose allow-list
refuses almost every program (even ls), so the --mount host-shell path is
unusable there. Branch on the node's OSImage: Bottlerocket nodes skip --mount
and run the helper image's own busybox shell with the host pid/net/ipc/uts
namespaces, starting in /proc/1/root so the live host filesystem and every
host process are still reachable. Normal hosts keep the --mount path with the
bash/sh probe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SametKUM SametKUM merged commit a35bbc2 into main Jun 10, 2026
7 checks passed
@SametKUM SametKUM deleted the fix/node-shell-bottlerocket branch June 10, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant