Repository navigation
engine: add engine-managed volumes - #13719
Conversation
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
|
Hey, amazing feature ! 🙏 I’ve been reading the design docs and I’ve got a question about one point for v1:
I have a repro here of a client-side TOCTOU: a writable exec changes the subdirectory after it has been checked, and the mount can then point outside Am I understanding correctly that this is an intentional exception for v1, and that containment inside volumes/v1 is not guaranteed when this race happens? I just want to make sure I understand this subtlety correctly. |
Rebasing onto main picked up Query.volume (dagger#13719), whose additions to the schema and every client collided with this stack's own generated output. The conflicts were resolved by regenerating rather than merging by hand, so this is codegen output only - no hand edits. Signed-off-by: Alex Suraci <[email protected]>
Rebasing onto main picked up Query.volume (#13719), whose additions to the schema and every client collided with this stack's own generated output. The conflicts were resolved by regenerating rather than merging by hand, so this is codegen output only - no hand edits. Signed-off-by: Alex Suraci <[email protected]>
Rebasing onto main picked up Query.volume (#13719), whose additions to the schema and every client collided with this stack's own generated output. The conflicts were resolved by regenerating rather than merging by hand, so this is codegen output only - no hand edits. Signed-off-by: Alex Suraci <[email protected]>
Rebasing onto main picked up Query.volume (#13719), whose additions to the schema and every client collided with this stack's own generated output. The conflicts were resolved by regenerating rather than merging by hand, so this is codegen output only - no hand edits. Signed-off-by: Alex Suraci <[email protected]>
Rebasing onto main picked up Query.volume (#13719), whose additions to the schema and every client collided with this stack's own generated output. The conflicts were resolved by regenerating rather than merging by hand, so this is codegen output only - no hand edits. Signed-off-by: Alex Suraci <[email protected]>
Summary
Dagger engine operators can attach storage beneath the engine state directory, but clients currently cannot expose that live operator-managed storage through the opaque
VolumeAPI. This adds engine-managed volumes: for example,engineVolume("datasets/models", subdir: "llama")mounts the operator-controlled directory at<engine-root>/volumes/v1/datasets/models/fs/llama.The public API is
Query.engineVolume(name, subdir?), with CLI/module arguments using addresses such as:Modules cannot construct engine volumes, matching the existing SSHFS product boundary, but they can accept and mount an opaque
Volumesupplied by their caller.Architecture and behavior
Volume; the host path is resolved lazily against the configured engine root at exec time.0755when absent. Existing operator-owned objects are preserved, and an explicitly selected subdirectory must already exist.rbind,rrowhen the engine supports recursivemount_setattr. The engine probes that capability once at startup in an isolated mount namespace. Older or syscall-restricted environments fall back torbind,ro, where the top-level bind is read-only but nested mounts retain their existing flags.The detailed design is checked in at
hack/designs/engine-volumes.html.Validation
TestVolume: 8/8 passed, covering engine volumes and existing SSHFS behavior.Non-goals