feat(storage)!: add live root-disk growth - #1533
Open
appcypher wants to merge 3 commits into
Open
Conversation
Extend the existing modify path to grow managed and flat ext4 roots, including checkpoint-backed qcow2 heads, without changing sealed layers. Persist pending growth for forward recovery and support staged stopped growth over the same logical disk chain. Add guest protocol generation 9 preflight and resize acknowledgments, per-layer snapshot capacities, user documentation, and a macOS live qualification harness and report. Pin the exact libkrun companion commit until the capacity API is released. Keep this change stacked directly on checkpoint-restore-clone (#6). Linux and Windows qualification and source publication remain pending.
Exercise 512 MiB to 4 GiB and 8320 MiB across managed and flat roots, raw and qcow2 heads, and live and stopped modification paths. Verify allocated data, snapshot capacities, immutable ancestors and cold boots. Add independent qemu-img and read-only e2fsck qualification on disposable copies and record the macOS release timings and remaining coverage gaps. No runtime behavior changes are included.
Use memory, max_memory and root_disk_size for both bare MiB integers and typed sizes. Update CLI callers and documentation and verify both input forms produce the same serialized patch values. BREAKING CHANGE: remove memory_mib, max_memory_mib, root_disk_size_mib, oci_upper_size and oci_upper_size_mib from SandboxModificationBuilder. Use the unsuffixed setters; no deprecation aliases are retained. Other SDK interfaces and wire fields are unchanged.
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.
TL;DR
Grow owned managed and flat ext4 root disks without restarting, including checkpoint-backed qcow2 roots. This is #7, stacked directly on #1503 with no newer main changes, and depends on libkrun #124.
Description
memory,max_memoryandroot_disk_sizeinstead of the_mibsetters oroci_upper_size*aliases. Bare MiB integers and typed sizes remain supported; other SDKs and serialized fields are unchanged. This is an intentional source-breaking API cleanup.Test Plan
cargo fmt --all -- --checkand pinned offline CLI check pass.cargo test --offline -p microsandbox --lib -- --test-threads=1: 667 passed, three ignored;cargo test --offline -p microsandbox-cli --lib commands::modify: ten passed. An unchanged stale-socket test failed in an earlier parallel suite and passed alone and serially.derivable_implsandtoo_many_argumentslint classes allowed.scripts/smoke/reports/root-disk-growth-2026-09-06.mdfor coverage and limitations.Confidence Score: 5/5
The PR appears safe to merge based on the reviewed changes, with no concrete blocking or independently actionable non-blocking issue identified.
The growth path validates the guest filesystem before mutation, records forward-recovery state before changing capacity, preserves sealed layers during stopped growth, verifies the resulting guest capacities, and fences snapshots and compaction while completion is pending.
Reviews (1): Last reviewed commit: "refactor(sdk)!: remove redundant modific..." | Re-trigger Greptile