Conversation
Allow standalone nodes to omit the gVisor payload when runc is the only required runtime, and prepare only the missing host filesystem capabilities before starting the node. Support a dedicated external filestore without creating a loop-backed image. Persist its filesystem identity and validate it both at container entry and before every sandboxd service start so a missing host mount fails closed across either restart path. Cover the launcher and restart guard with shell tests, and build and exercise a real runc-only standalone sandbox in CI. Signed-off-by: wayne <rcywjo@gmail.com>
rcyw
marked this pull request as ready for review
September 21, 2026 16:42
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.
Summary
ext4.imgMotivation
Standalone deployments currently always package and configure runsc, and a configured
filestore_dir_sizecreates a loop-backed filesystem below the standalone data directory. Bare-metal runc environments should be able to omit the unused gVisor payload and place sandbox writable data on a dedicated filesystem without silently falling back to the parent disk after a mount or restart failure.Design
Runtime capabilities
AKERNEL_ENABLE_RUNSC=falsenow skips the gVisor payload at build time. Disabling runsc requiresAKERNEL_ENABLE_RUNC=true, and the standalone launcher removes the runsc runtime entry while enabling runc.The image records both runsc and runc capabilities in OCI labels. The launcher checks the requested runtime configuration against those labels before creating the node container, preventing a runc-only image from starting with a stale runsc configuration. Images predating the runsc label retain the historical assumption that runsc is present.
When runc is enabled, the launcher verifies the host overlay, EROFS, and loop capabilities and loads only missing modules.
External filestore
STANDALONE_FILESTORE_DIRselects an existing host mountpoint. Before launch, the launcher verifies that the path:/nor overlapping the standalone data directoryext4.imgThe generated sandboxd configuration sets
filestore_dir_size="", so sandboxd uses the real filesystem directly. The launcher records the expected source, filesystem type, and UUID under the persistent standalone data directory and mounts that state read-only at/etc/akernel/external-filestore.External-filestore mode also sets
AKERNEL_EXTERNAL_FILESTORE_REQUIRED=true. Validation runs both at the standalone container entrypoint and in sandboxd'sExecStartPre, so missing state, a changed filesystem identity, a loop device, a legacy image, or a non-writable mount fails closed across container and service restarts.This does not bind the YuanRong service lifecycle to sandboxd. Cross-component readiness remains separate from the storage guard.
Compatibility
The default image still includes runsc, runc remains opt-in, and standalone deployments that do not set
STANDALONE_FILESTORE_DIRretain the existing loop-backed filestore behavior.Validation
make SHELL=/bin/bash deploy-script-checkmake SHELL=/bin/bash check/dev/kvmis absent by default and injected only for runc sandboxes requestingextra_config={"enableKVM": true}ext4.img/and a mount containing the standalone data directory are rejected before the write probe