Repository navigation
Fix Docker Runtime bootstrap on Docker before 28 (copyUIDGID with uid:gid user) - #21
Merged
Merged
Conversation
The Docker provider launches the Runtime container with Config.User
"1000:1000" and copied the bootstrap archive with copyUIDGID. Docker
before 28 resolves Config.User with a passwd lookup and passes a
"uid:gid" pair through as a single user name, so the archive request
fails ("getent unable to find entry \"1000:1000\"") and the Runtime starts
without runtime-bootstrap.json. Rely on the archive's own numeric owner
instead; the tar entries already carry uid/gid 1000, which the daemon
preserves on extraction.
Add a regression test that rejects a copyUIDGID request the way Docker
26/27 does.
Co-authored-by: multica-agent <github@multica.ai>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Goal
Docker-backed
openai_hostedsandboxes never start on Docker Engine < 28: the Runtime container stays increated, the environment stayspending, and the console marks the node "Needs attention".Root cause
services/core/internal/sandbox/docker/container_options.gocreates the Runtime container withConfig.User = "1000:1000", andbootstrap.gocopied the bootstrap archive withcopyUIDGID. Docker before 28 resolvesConfig.Userwith a passwd lookup and passes a"uid:gid"pair through as a single user name, soPUT /containers/<id>/archivefails:The Runtime then starts without
/home/runtime/runtime-bootstrap.json(oac-daemon: connect: Runtime bootstrap file unavailable, exit 1) and the allocation never settles. Upstream added auid:gid-aware lookup in 28.0.0; 26.x/27.x are affected.Change
services/core/internal/sandbox/docker/bootstrap.go: stop requestingcopyUIDGIDand rely on the archive's numeric owner. The tar entries already carry uid/gid 1000, which the daemon preserves on extraction, so ownership is unchanged on every Docker version.bootstrap_test.go: add a regression test whose fake daemon rejects acopyUIDGIDrequest the way Docker 26/27 does; it fails before the fix and passes after.Verification
go test ./services/core/internal/sandbox/docker/... -count=1-> okTestBootstrapDoesNotRequireContainerUserLookupfails on the parent commit with the exact dockerd error and passes after.go build ./services/core/cmd/sandbox-node-> okmake check-names-> passmake check-core-packages-> every package passes exceptservices/core/internal/nativeinstaller(two curl-dependent tests), which fail identically on unmodifiedorigin/mainin this environment (host curl rejects--max-time/ certificate type) -- pre-existing, unrelated.python3 scripts/ci_plan.py plan --base origin/main --head HEAD-> hygiene, compose, backend, apiNotes
Boundaries
No secrets, tokens or connection strings in the diff or this description.