Repository navigation
Conversation
opensandbox-group#2421 rejects duplicate mount paths within a request, but the server adds mounts of its own: the docker.sandbox_binds destinations, a tmpfs at the execd isolation directory when isolation is enabled, and /oem for Windows sandboxes. A volume at one of those paths, or a mountPath containing ':', still reached Docker, which refused the container and the client got a 500 after the image pull and sidecar setup. Check these paths up front and return 400 INVALID_MOUNT_PATH instead.
acodercat
requested review from
Generalwin,
Pangjiping,
hittyt,
jwx0925 and
ninan-nn
as code owners
October 31, 2026 03:42
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
A request volume at /opt/opensandbox replaces the egress runtime mount, but the check matched the raw bind string. /opt/opensandbox/ or //opt/opensandbox slipped past it, so the server added the runtime bind as well and Docker refused the duplicate mount point. Compare the cleaned mount paths of the request volumes instead.
It only reads the request, like the module-level _clean_mount_path it uses.
This branch has not been deployed
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.
#2421 made the Docker runtime reject duplicate and root mount paths with a 400 before anything is provisioned. That check only compares the request's volumes with each other. The server also adds mounts of its own: every
docker.sandbox_bindsdestination from the config, a tmpfs at/var/lib/execd/isolationwhenbootstrap.execd.isolation=enable, and/oemfor Windows sandboxes. A volume whosemountPathlands on one of those, for example a request that mounts a volume at the CA path the operator binds throughsandbox_binds, still goes to Docker. Docker answersDuplicate mount point, and the client gets500 DOCKER::SANDBOX_START_FAILEDafter the image pull and sidecar setup.One server mount already tried to handle this. A request volume at
/opt/opensandboxreplaces the egress runtime mount, but that check matched the raw bind string./opt/opensandbox/or//opt/opensandboxslipped past it, the server added the runtime bind as well, and Docker refused the duplicate.A
mountPathcontaining:(for example/data:ro) has the same outcome. The bind string becomesvol:/data:ro:rw, Docker rejects it as an invalid volume specification, and the client sees a 500.Summary
_validate_volume_definitionsseeds its duplicate check with the paths the server mounts itself for this request, normalized the same way as request paths. A clash returns 400VOLUME::INVALID_MOUNT_PATH.mountPathcontaining:is rejected with the same code._has_volume_at), so any spelling of/opt/opensandboxreplaces the runtime mount as intended./oempath is now a constant shared by the bind builder and the check.docs/examples/docker-pvc-volume-mount.mdlists the new rules.Testing
Not run (explain why)
Unit tests
Integration tests
e2e / manual verification
New
test_mount_paths_docker_rejects_are_400covers asandbox_bindsdestination (written differently on each side to exercise normalization), the isolation directory,/oemon Windows, and a path with:. Each case returns 500 on current main, and now returns 400 with no Docker calls. Removing any one of the four checks, or the normalization ofsandbox_bindsdestinations, fails its case.New
test_request_volume_at_runtime_path_replaces_runtime_mountcovers/opt/opensandbox,/opt/opensandbox/and//opt/opensandbox. The last two get a second runtime bind on current main, and fail again if the comparison goes back to the raw path.Docker's behavior was checked against a real daemon: a bind plus bind, tmpfs plus bind, and
/oemplus/oemat the same destination, and a bind with a:in the container path, are all refused at container creation.The full server suite passes (2704 passed) and
ruffis clean.pyrightreports one more error of the existingapp_configon the mixin kind, the same one already reported a few lines above.Breaking Changes
Requests rejected now were already failing at container creation.
Checklist