validation: Allow mounting the same volume at multiple paths - #1611
Merged
Michelle Au (msau42) merged 3 commits intoSep 14, 2026
Merged
Conversation
shrutiyam-glitch
marked this pull request as ready for review
September 11, 2026 16:00
shrutiyam-glitch
requested review from
Julian Gutierrez Oschmann (juli4n) and
Michelle Au (msau42)
September 11, 2026 16:01
| if got["error"] != "" { | ||
| t.Fatalf("reading through %s what was written through %s: %s", scratchPathB, scratchPathA, got["error"]) | ||
| } | ||
| if got["content"] != probeWrittenContent { |
Collaborator
There was a problem hiding this comment.
do you want to verify the content at both paths?
| }) | ||
|
|
||
| t.Run("SameImageVolumeAtTwoPaths", func(t *testing.T) { | ||
| got := probeJSON(ctx, t, router, actorRef, "/readfile?path="+mountPathAlias+"/"+payloadName) |
Collaborator
There was a problem hiding this comment.
the mount verification is pretty similar for all volume types, with only the path and payload being different. Is it worth writing a helper function for it?
| requireContentAtBoth(ctx, t, router, actorRef, writePath, aliasPath, probeWrittenContent) | ||
| } | ||
|
|
||
| func TestImageVolume(t *testing.T) { |
Collaborator
There was a problem hiding this comment.
nit: we are no longer testing just image volumes. Maybe we should rename the test and the file name to something like TestCombinedVolumes?
Michelle Au (msau42)
approved these changes
Sep 14, 2026
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.
Fixes #1612
Rekeys
Container.volume_mountsbymount_path(instead ofname) to align with standard Kubernetes pod semantics and allow mounting the same volume at multiple distinct paths within a container.The container runtimes (
ateom-gvisorandateom-microvm) already support binding a single volume to multiple target paths. However, the API validation layer previously rejected this becausevolume_mountswas keyed by name (+k8s:listMapKey=name).Key Changes
Proto & Validation: Changed
Container.volume_mountslist map key to+k8s:listMapKey=mount_pathinpkg/proto/ateapipb/ateapi.proto.Custom Validation: Updated
ValidateCustom_Container_VolumeMountsincmd/ateapi/internal/controlapi/actor_template.goto remove duplicate volume name checks while continuing to reject nested/overlapping mount paths.Unit Tests: Updated
actor_template_test.goto assert that mounting the same volume at two paths is allowed, and mounting two volumes at the same path is rejected.E2E Tests: Added test coverage in
internal/e2e/suites/imagevolume/imagevolume_test.go:SameImageVolumeAtTwoPaths).SameDurableVolumeAtTwoPathsSharesWrites).SameExternalVolumeAtTwoPathsSharesWrites).SurvivesSuspendResume).Tests pass
Appropriate changes to documentation are included in the PR