build.sh: translate workspace bind mounts for a shared Docker daemon#89
Open
lacraig2 wants to merge 1 commit into
Open
build.sh: translate workspace bind mounts for a shared Docker daemon#89lacraig2 wants to merge 1 commit into
lacraig2 wants to merge 1 commit into
Conversation
The rehosting CI shared-docker runners run one dockerd per node, so the daemon cannot see a runner's per-pod checkout under /home/runner/_work. The raw '-v $PWD:/app' (and the kernel-devel / output binds, all rooted in that checkout) then mount empty dirs, and the build dies with '/app/_in_container_build.sh: No such file'. Add rewrite_mount(), mirroring the fix in linux_builder, which rewrites a bind source via PENGUIN_HOST_MOUNT_FROM/TO (exported by the runner, the same mechanism penguin's wrapper uses) only when both vars are set and the path is under _FROM. Local and GitHub-hosted builds leave them unset, so paths pass through unchanged and behaviour is identical to before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI on the rehosting shared-docker runners fails at the container build step:
Those runners run one dockerd per node (the shared-docker daemon), so the daemon cannot see a runner's per-pod checkout under
/home/runner/_work. The raw-v $PWD:/appbind — plus the kernel-devel and output binds, all rooted in that checkout — then resolve to empty dirs in the daemon's namespace, and the build dies with the error above.This is not an infra gap: a per-pod
_workpath is ephemeral and cannot be mirror-mounted daemon-side. The script issuing thedocker runhas to translate the source path. This is the same fix that landed inlinux_builder(build-once/shared-daemon PR).Fix
Add
rewrite_mount(), which rewrites a bind source viaPENGUIN_HOST_MOUNT_FROM/PENGUIN_HOST_MOUNT_TO(exported by the runner — the same mechanism penguin's wrapper uses) only when both env vars are set and the path is under_FROM. All three binds here (kernel-devel extract,$PWD, build output) live under the workspace, so all three are rewritten.Safety
Pure no-op off the shared runners: local builds and GitHub-hosted runners leave both env vars unset, so every path passes through unchanged — behaviour is byte-identical to before. An absolute
--kernel-devel-pathoutside_FROMis also left as-is.Unblocks CI for all open igloo_driver PRs (#88, #87, …) once they rebase onto main.