You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sandbox): skip read-only mounts during recursive chown of /sandbox
The sandbox supervisor crashed with EROFS when the recursive chown of
/sandbox encountered read-only submounts. This is common in gVisor-based
Kubernetes deployments where read-only volume mounts are the only way to
enforce per-directory immutability (Landlock is unavailable under gVisor).
The fix adds two guards to the ownership walk:
1. Mount-boundary detection via st_dev comparison — paths on a different
filesystem than /sandbox are skipped entirely, avoiding the chown
call on nested read-only mounts.
2. EROFS tolerance — if chown still returns EROFS (e.g. the root mount
itself is read-only), the error is logged at debug level and startup
continues.
Symlink skipping (already present) is preserved and extracted into the
recursive walker for consistency.
Manually verified on a kind cluster with a read-only PVC mounted at
/sandbox/readonly-data: the pod starts successfully, writable paths are
owned by the sandbox user, and the read-only mount retains root
ownership. Kubernetes e2e test coverage is a separate follow-up.
Closes#2294
Signed-off-by: Varsha Prasad Narsing <varshaprasad96@gmail.com>
0 commit comments