Skip to content

feat(sandboxer): passing Mount info across sandboxer and runtime - #154

Merged
dungdm93 merged 7 commits into
mainfrom
mount-passing
Sep 17, 2026
Merged

dungdm93 merged 7 commits into
mainfrom
mount-passing

Conversation

@dungdm93

Copy link
Copy Markdown
Member

Overview

Introduces a unified sandboxer.Mounter interface to decouple mount topology decisions from sandbox engines and container runtimes. Sandboxers dictate how their directories are exposed (coarse vs discrete subpaths, bind vs volume mounts, runtime symlink resolution), while overlay engines and action runtimes consume mounts without engine-specific coupling.

High-Level Design

  • sandboxer.Mounter Interface:

    • OverlayMounts(target Layout, coarse bool) []*types.Mount: Generates mounts for overlay JobContainers. Supports coarse mounts (whole job directory) when source and target layouts align, or discrete subpath mounts (workspace, temp, actions, tools, runtimes).
    • RuntimeMounts(target Layout) []*types.Mount: Supplies mounts required by action containers (workspace, temp).
    • Exposing the mounter through LaunchResponse.Mounter.
  • Sandboxer Implementations:

    • Incus: Mounts directories into JobContainers using recursive bind mounts (BindOptions: { Recursive: "enabled" }).
    • Host: Evaluates host symlinks under runtimes to canonical host paths with ReadOnly: true so container runtimes access valid directories.
    • Docker: Backed by a shared job volume (type mounter string), generating named volume mounts with subpaths.
  • Overlay & Runtime Integration:

    • containerizedEngine: Consumes resp.Mounter.OverlayMounts when launching overlay JobContainers.
    • wire_runtime: Injects sandboxer.Mounter via Dig. When running sibling action containers alongside a JobContainer, translates requested mounts through the parent JobContainer's mount namespace (translateContainerMounts). Directly applies mounts for direct sandboxes.

@dungdm93
dungdm93 force-pushed the mount-passing branch 5 times, most recently from 137c0bf to 41b3e2b Compare September 17, 2026 08:23
@dungdm93
dungdm93 force-pushed the mount-passing branch 2 times, most recently from b3216e6 to f333b5c Compare September 17, 2026 09:35
@dungdm93 dungdm93 changed the title feat(sandboxer): mount passing mechanism across sandboxers and runtimes feat(sandboxer): passing Mount info across sandboxer and runtime Sep 17, 2026
@dungdm93
dungdm93 force-pushed the mount-passing branch 3 times, most recently from 22e76dc to fba1c01 Compare September 17, 2026 10:42
@dungdm93
dungdm93 merged commit ab5a626 into main Sep 17, 2026
2 checks passed
@dungdm93
dungdm93 deleted the mount-passing branch September 17, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant