feat: persist volume path to database and pass through gRPC#2297
Draft
joe-lombrozo-s-bot[bot] wants to merge 2 commits intomainfrom
Draft
feat: persist volume path to database and pass through gRPC#2297joe-lombrozo-s-bot[bot] wants to merge 2 commits intomainfrom
joe-lombrozo-s-bot[bot] wants to merge 2 commits intomainfrom
Conversation
Adds volume_path persistence throughout the stack so the orchestrator no longer needs to recompute filesystem paths for volumes. Changes: - DB: add nullable volume_path column to volumes table - Proto: add optional volume_path to VolumeInfo, SandboxVolumeMount, and CreateVolumeResponse - Orchestrator: CreateVolume returns the computed path; getVolumeRootPath and getFilesystemAndPath use persisted path when available, falling back to BuildVolumePath for existing volumes without a path - NFS handler: same fallback pattern for chroot resolution - API: store orchestrator-returned path in DB after creation, include in JWT (volpath claim), pass through to sandbox mounts and resume - Types: add VolumePath to SandboxVolumeMountConfig for snapshot persistence Fully backwards-compatible: existing volumes without volume_path continue to work via the legacy path computation.
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.
Persists the volume filesystem path so the orchestrator doesn't need to recompute it from volume type + team ID + volume ID on every operation.
Changes
Database:
volume_pathcolumn tovolumestableCreateVolumeaccepts optional path,UpdateVolumePathadded for post-creation updateProto:
VolumeInfo:optional string volume_path = 4CreateVolumeResponse:string volume_path = 1(orchestrator returns computed path)SandboxVolumeMount:optional string volume_path = 5Orchestrator:
CreateVolumereturns the computed full path in the responsegetVolumeRootPath/getFilesystemAndPathuse persisted path when present, fall back toBuildVolumePathwhen emptyChrootPathwhen path is set,Chroot(type-based lookup) otherwiseBuilder.ChrootPath()method for direct path chrootAPI:
volume_create.go: stores orchestrator-returned path viaUpdateVolumePathwithin the same transactionvolume_token.go: addsvolpathJWT claim (when path is set)volume_util.go: passes path throughtoVolumeKeysandbox_create.go: passes volume path to sandbox mount configsandbox_resume.go: passes volume path from snapshot confignodemanager/sandboxes.go: persists volume path in snapshot mount configBackwards compatible: existing volumes without
volume_pathcontinue working via the legacy path computation. All new fields are optional/nullable.