Fail fast in chroot mode on Alpine/musl daemon hosts and document glibc requirements#3397
Conversation
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
There was a problem hiding this comment.
Pull request overview
This PR makes AWF chroot mode’s host prerequisites explicit and enforces them early, so incompatible daemon hosts (notably Alpine/musl) fail fast with clear, actionable errors instead of causing cascading runtime failures.
Changes:
- Added early Alpine/musl detection in the chroot startup path and tightened host prerequisite checks (capsh +
/bin/bash) in the agent entrypoint. - Updated chroot documentation to explicitly require a glibc-based daemon host and added troubleshooting guidance for the new fail-fast error.
- Improved top-level discoverability by noting the glibc-host requirement in the README’s docs index.
Show a summary per file
| File | Description |
|---|---|
| README.md | Notes the glibc-based daemon host requirement in the Chroot mode docs link for discoverability. |
| docs/chroot-mode.md | Documents the glibc + bash requirements and adds troubleshooting for Alpine/musl detection. |
| containers/agent/entrypoint.sh | Implements early musl/Alpine detection and adds explicit host checks for capsh and /bin/bash. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 2
| # Chroot mode currently requires a glibc-based host userspace. | ||
| # Alpine/musl hosts do not provide a compatible capsh/bash toolchain. | ||
| if [ -f /host/etc/alpine-release ] || ls /host/lib/ld-musl-*.so.1 /host/usr/lib/ld-musl-*.so.1 >/dev/null 2>&1; then | ||
| echo "[entrypoint][ERROR] AWF chroot mode requires a glibc-based daemon host (Ubuntu/Debian/RHEL-family)." | ||
| echo "[entrypoint][ERROR] Detected Alpine/musl host filesystem under /host." | ||
| echo "[entrypoint][ERROR] Alpine/musl daemon hosts are not currently supported in chroot mode." | ||
| exit 1 |
| if ! chroot /host which capsh >/dev/null 2>&1; then | ||
| if ! chroot /host /bin/sh -c 'command -v capsh >/dev/null 2>&1'; then | ||
| echo "[entrypoint][ERROR] capsh not found on host system" | ||
| echo "[entrypoint][ERROR] Install libcap2-bin package: apt-get install libcap2-bin" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@copilot address review feedback |
Addressed in commit 0434a38.
|
Smoke Test Results✅ GitHub API: 2 PR entries found in recent-prs.json Overall: PASS — All smoke tests completed successfully.
|
|
Smoke Test: Copilot BYOK (Offline) Mode
Running in BYOK offline mode ( Overall: PASS (core BYOK path verified; pre-step template vars unexpanded for tests 2–3)
|
🤖 Smoke Test Results
Overall: PASS PR: Fail fast in chroot mode on Alpine/musl daemon hosts and document glibc requirements
|
|
Smoke test Codex: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Chroot Smoke Test Results
Result: FAILED — Python and Node.js versions differ between host and chroot. Go matches.
|
|
Smoke Test Results: FAIL. See log for details. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
Smoke Test Results — FAIL
Overall: FAIL —
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
AWF chroot startup implicitly depended on a glibc/Ubuntu-like daemon host (
capsh,/bin/bash, hostnodepath), causing late, cascading runtime failures on Alpine/musl runners. This PR makes that contract explicit and surfaces incompatibility at startup with actionable errors.Chroot preflight hardening (entrypoint)
/host/etc/alpine-releaseor musl loader presence).capshand/bin/bashbefore proceeding.Documentation: explicit supported host contract
/bin/bashas required in addition tocapsh.Top-level discoverability