fix(chroot): mount binaries overlay at /host/tmp/awf-runner-bin to avoid read-only /host/usr collision on ARC/DinD#5482
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an ARC/DinD chroot-mode volume mount collision where Docker can’t create /host/usr/local/bin as a mount point after /host/usr has been mounted read-only, preventing runner-installed binaries from being visible inside the chroot.
Changes:
- Move the chroot runner-binaries overlay mount target from
/host/usr/local/binto/host/tmp/awf-runner-bin(under the writable/host/tmp). - Update the agent entrypoint to detect the new mount and ensure
/tmp/awf-runner-binis included in the chroot PATH. - Update existing tests and add a regression test for the
binariesSourcePath == dockerHostPathPrefixcollision case.
Show a summary per file
| File | Description |
|---|---|
| src/services/agent-volumes/system-mounts.ts | Changes the runner-binaries overlay mount target to /host/tmp/awf-runner-bin to avoid read-only /host/usr mount-point creation failures. |
| src/services/agent-volumes-mounts.test.ts | Updates assertions for the new mount target and adds a regression test for the ARC/DinD collision scenario. |
| containers/agent/entrypoint.sh | Prepends /tmp/awf-runner-bin to the chroot PATH when the overlay is present and updates the preflight PATH error message. |
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: 1
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Build Test Suite completed successfully! |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
✅ Smoke Claude passed |
|
❌ Security Guard failed. Please review the logs for details. |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Contribution Check completed successfully! Contribution guidelines review complete - PR follows all applicable CONTRIBUTING.md guidelines; no comment needed. |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
🔬 Smoke Test: Copilot PAT Auth — PR #5482
Overall: PARTIAL — MCP test passed; pre-step outputs ( Auth mode: PAT (COPILOT_GITHUB_TOKEN) cc
|
Smoke Test Results for #5482
Overall Status: PASS
|
|
fix(chroot): mount binaries overlay at /host/tmp/awf-runner-bin to avoid read-only /host/usr collision on ARC/DinD by Copilot
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Notes
|
Chroot Version Comparison Results
Overall: ❌ FAILED — Python and Node.js versions differ between host and chroot environments.
|
🔬 Smoke Test Results
Overall: FAIL — workflow template variables were not substituted; pre-computed step outputs unavailable. PR: fix(chroot): mount binaries overlay at /host/tmp/awf-runner-bin to avoid read-only /host/usr collision on ARC/DinD
|
Smoke Test Results — PR #5482
Overall: FAIL
|
Copilot BYOK Smoke Test Results✅ All tests passed — Direct BYOK mode operational Tests:
Configuration: Direct BYOK mode (COPILOT_PROVIDER_API_KEY) via api-proxy → api.githubcopilot.com Status: PASS
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
|
📡 Smoke Test: API Proxy OpenTelemetry Tracing
All scenarios pass or are expected-pending during development. ✅
|
Smoke Test Results
Overall Status: FAIL 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.
|
On ARC/DinD with
--docker-host-path-prefix /tmp/gh-awandchroot.binariesSourcePath: /tmp/gh-aw, Docker applies bind mounts sequentially: the/tmp/gh-aw/usr:/host/usr:romount makes/host/usrread-only, then the attempt to create/host/usr/local/binas a mount point fails withmkdirat: read-only file system. This blocks the chrooted agent from ever seeing runner-installed binaries.Changes
src/services/agent-volumes/system-mounts.tschrootBinariesSourcePathwas mounted at/host/usr/local/bin:ro— a path nested inside the read-only/host/usrparent mount./host/tmp/awf-runner-bin:ro. Since/host/tmpis always mounted writable (/tmp:/host/tmp:rw), Docker can unconditionally create the subdirectory mount point, even when the staged/usrtree lacks alocal/bindirectory.containers/agent/entrypoint.sh/host/tmp/awf-runner-binand prepends/tmp/awf-runner-bintoAWF_HOST_PATH, making the overlay visible on the chroot PATH./tmp/awf-runner-binamong the standard PATH directories.Tests
/host/usr/local/bin→/host/tmp/awf-runner-bin).binariesSourcePath == dockerHostPathPrefix: