Skip to content

build.sh: translate workspace bind mounts for a shared Docker daemon#89

Open
lacraig2 wants to merge 1 commit into
mainfrom
fix-shared-daemon-work-mount
Open

build.sh: translate workspace bind mounts for a shared Docker daemon#89
lacraig2 wants to merge 1 commit into
mainfrom
fix-shared-daemon-work-mount

Conversation

@lacraig2

Copy link
Copy Markdown
Contributor

Problem

CI on the rehosting shared-docker runners fails at the container build step:

bash: line 1: /app/_in_container_build.sh: No such file or directory
##[error]Process completed with exit code 127.

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:/app bind — 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 _work path is ephemeral and cannot be mirror-mounted daemon-side. The script issuing the docker run has to translate the source path. This is the same fix that landed in linux_builder (build-once/shared-daemon PR).

Fix

Add rewrite_mount(), which rewrites a bind source via PENGUIN_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-path outside _FROM is also left as-is.

Unblocks CI for all open igloo_driver PRs (#88, #87, …) once they rebase onto main.

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.
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