Skip to content

Grow detached Firecracker volumes (POST /volumes/{id}/resize) - #83

Merged
jerryfane merged 4 commits into
mainfrom
volume-grow
Nov 4, 2026
Merged

jerryfane merged 4 commits into
mainfrom
volume-grow

Conversation

@jerryfane

Copy link
Copy Markdown
Contributor

Requested by Deimos Forge (msg 392524; owner epic jerryfane/deimos-forge#1/#7): existing volumes (e.g. 4096 MiB) must grow to 10 GiB without hand-editing records.

API. POST /volumes/{id}/resize {"sizeMiB":N}, control API key (operator route like backup; not reachable with sandbox envd tokens) -> 200 {volumeID,name,sizeMiB}. Never shrinks (400), same size is a no-op, attached/busy 409, unknown 404, over budget or below the disk floor 400 (only the growth counts), drivers without the capability 501.

Driver. Under volumeMu: read record, volumeInUse, trusted e2fsck/resize2fs (found at call time, so workers that never grow need nothing new), budget + free-disk floor for the growth, then reserve like an in-flight restore (blocks attach/delete/backup/second grow and counts against budget). Unlocked: extend the disk file, e2fsck -f -p, resize2fs, then replace the record by atomic rename. A failed e2fsck truncates the file back (nothing resized). A crash or failed resize2fs leaves disk larger than record; repeating the same request completes it (a disk larger than the request is refused, never cut). Stale *.json.tmp removed at startup.

Risk to accept. e2fsck/resize2fs run as root on a filesystem the guest wrote: the first place the host parses guest-controlled metadata (mke2fs only writes a fresh fs; nothing is mounted). Documented in docs/firecracker.md. If that is not acceptable, the alternative is a guest-side grow at attach time (guest agent + image change), which this PR does not do.

Evidence (seat, local, Go 1.26.10). go vet and go test -race ./... pass. New tests: grow/refusals/retry-after-failure/hold-during-grow/fsck-rollback in internal/vm, API behavior + 501 in internal/control. Mutants: removing the reservation turns TestFirecrackerVolumeGrowHoldsVolume red; removing the fsck rollback turns TestFirecrackerVolumeGrowFsckFailureRestoresDisk red. A third mutant (disable the explicit shrink check) stays green because growDisk also refuses a disk larger than the target: equivalent, not a gap. Real tools smoke (outside the driver, host.ResizeVolume with Debian e2fsprogs 1.47.0): 128 MiB ext4 holding a file -> 192 MiB, 49152 blocks, file readable, e2fsck clean; a filesystem with trashed group descriptors -> e2fsck exit 4, refused, filesystem unresized.

Not verified. An end-to-end grow on a real Firecracker volume with the daemon, attach after grow, and the guest seeing the larger filesystem. Forge plans to test on its throwaway instance first. No deployment.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Agent: g7-review
Runtime: omp
Job: local-review-review-router-18e4c53209eaa8b4-1

Decision: changes_requested
Summary: Reviewed the full PR #83 diff from base 203da45 to exact head c36d154. Build, vet, focused regressions, and both affected package suites passed. A native ext4 smoke check preserved existing data and produced a clean 192 MiB filesystem. Independent probes reproduced two failure-boundary defects. The frozen prior-verdicts file contains no PR #83 verdicts or findings to answer. No repository files were changed; additional probes used a /tmp Go overlay.
Severity: P1

Findings

  • Filesystem tools survive daemon death and overlap a restarted volume attachment (P1)
    • detail: The new e2fsck/resize2fs calls use linuxFCHost.run, whose exec.CommandContext has neither parent-death termination nor a child-held storage lock. SIGKILL of the daemon leaves the filesystem tool running, but releases the instance claim and loses volumeTransfers. A restarted daemon can therefore attach the same image while the old tool still modifies it, risking filesystem corruption. The probe exercised the production driver and host execution path with a gated helper replacing resize2fs: after killing the owning process, a new driver reclaimed the instance and attached the volume to a fake VM before the old helper completed. Fence storage access across daemon death until the helper has terminated; process-local reservations do not provide that guarantee.
    • evidence_locator: /tmp/pr83-review-probes_test.go:TestPR83ResizeSurvivesDaemonDeath; corrected crash-probe command in tests_run
    • locator: internal/vm/firecracker_host.go:143-150; internal/vm/firecracker_host.go:64-69; internal/vm/firecracker_volume_resize.go:83-85
  • Failed growth releases capacity that the enlarged disk still consumes (P2)
    • detail: After filesystem growth succeeds, a record-publication failure returns through the unconditional releaseVolumeTransfer defer. The disk remains enlarged while budget calculations use the old record, and restart does not reconcile that discrepancy. With a 256 MiB budget, the probe grew a real filesystem from 128 to 192 MiB, injected a record-publication failure, then successfully created another 128 MiB volume: 320 MiB of disk images were admitted against the 256 MiB limit. Restart accepted the same state. Retain or reconstruct accounting for uncommitted growth until its record is successfully published or the enlarged volume is deleted.
    • evidence_locator: /tmp/pr83-review-probes_test.go:TestPR83FailedRecordGrowUndercountsBudget; failed-record quota-probe command in tests_run
    • locator: internal/vm/firecracker_volume_resize.go:83-92; internal/vm/firecracker_volume_resize.go:105-114

Tests Run

  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go build ./...","outcome":"Passed."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go vet ./...","outcome":"Passed."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go test ./internal/vm ./internal/control -run 'Test(FirecrackerVolume|FirecrackerClaimsVolume|FirecrackerBackup|FirecrackerRestore|Volume)' -count=1 -v","outcome":"Passed both packages, including all new growth tests and related volume, restore, and recovery checks."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go test ./internal/vm ./internal/control -count=1","outcome":"Passed complete affected package suites: internal/vm 17.653s; internal/control 10.840s."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go test -overlay=/tmp/pr83-review-overlay.json ./internal/vm -run '^TestPR83FailedRecordGrowUndercountsBudget$' -count=1 -v","outcome":"Probe passed, confirming admission of 320 MiB of images against a 256 MiB budget after record-publication failure; restart accepted the state."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go test -overlay=/tmp/pr83-review-overlay.json ./internal/vm -run '^TestPR83(NativeExt4Grow|ResizeSurvivesDaemonDeath|FailedRecordGrowUndercountsBudget)$' -count=1 -v","outcome":"Native ext4 and quota probes passed. Native filesystem reached 201326592 bytes, preserved sentinel contents, and passed final e2fsck. Combined command failed because the strengthened crash probe omitted rearming its fake firewall; this probe-fixture omission was corrected before the targeted rerun."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/bin:/usr/bin:/bin CGO_ENABLED=0 go test -overlay=/tmp/pr83-review-overlay.json ./internal/vm -run '^TestPR83ResizeSurvivesDaemonDeath$' -count=1 -v","outcome":"Corrected crash probe passed, confirming that restart reclaimed the instance and attached the volume to a fake VM while the prior filesystem subprocess remained alive and subsequently completed."}

Raw runtime output was retained in local Gitmoot state and is not posted here.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Addressing review local-review-review-router-18e4c53209eaa8b4-1 (changes_requested at c36d154) at b96aebf.

P1 (tools outlive a killed daemon): the grow now takes an exclusive flock on the disk and passes that open file to e2fsck and resize2fs (inherited fd), so the lock lives as long as the last tool. volumeInUse (attach, delete, backup, grow) probes the lock, independent of process memory. Probe on real tools: SIGKILL of the process mid-resize2fs left the tool running, a fresh process saw EWOULDBLOCK, then the lock cleared when the tool exited with the fs fully grown (49152 blocks). Tests: TestFirecrackerVolumeGrowFencedByDiskLock (in-memory reservation cleared, attach/delete/backup/grow all busy), TestLinuxHostResizeToolsKeepDiskLocked (real host, lock held by the tool after the parent descriptor closes).

P2 (failed record publication released capacity): budget accounting (create, restore, grow) now counts each volume at max(record, disk file size); a retry no longer double counts. TestFirecrackerVolumeGrowFailedRecordKeepsBudget.

Mutants all red: no flock probe, tools not inheriting the lock, record-size-only accounting. go vet and go test -race ./... pass. Still not verified: real Firecracker end to end.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Agent: g7-review
Runtime: omp
Job: local-review-review-router-18e4c73f7724104d-1

Decision: changes_requested
Summary: Reviewed b96aebf against c36d154 only. Both prior findings are resolved by independently executed probes. One new P2 regression remains: in-flight growth is charged twice, rejecting valid concurrent volume operations. Build, vet, focused tests, and the complete VM suite pass; the independent valid-input probe reproduces the regression. No repository files were changed.
Severity: P2

Findings

  • Do not count an in-flight disk extension twice against the volume budget (P2)
    • detail: CreateVolume initializes used with reservedVolumeMiB, which includes the growth reservation, then adds volumeFootprintMiB, which already includes that growth once growDisk extends the file. With a 320 MiB budget, growing a 128 MiB volume to 192 MiB therefore reports 256 MiB used and rejects a concurrent 128 MiB create, although the resulting disks total exactly 320 MiB. The identical create succeeds after growth completes and releases its reservation. The changed reserveRestore and reserveGrowth accounting has the same duplicate-charge pattern. Reconcile each growth reservation with its disk footprint so pending capacity is counted once while failed-publication growth remains accounted for.
    • evidence_locator: /tmp/pr83-review-probes_test.go:78-96, TestPR83InFlightGrowthValidConcurrentCreate; final overlay command in tests_run
    • file: internal/vm/firecracker_volumes.go
    • line: 284
  • Filesystem tools survive daemon death and overlap a restarted volume attachment (P1)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f1
    • detail: Resolved at this head. TestPR83DaemonDeathFencesRestart exercised the production driver and linuxFCHost execution path using a gated resize helper and real filesystem tools. After SIGKILL of the owning process, a new driver reclaimed the instance, but attach, delete, backup, and grow all returned ErrVolumeTransferBusy while the orphan helper retained the inherited disk lock. After resize2fs completed, the filesystem measured 192 MiB and attachment succeeded.
    • evidence_locator: /tmp/pr83-review-probes_test.go:112-155, TestPR83DaemonDeathFencesRestart; passing final overlay command in tests_run
    • file: internal/vm/firecracker_host.go
    • line: 156
    • state: answered
  • Failed growth releases capacity that the enlarged disk still consumes (P2)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f2
    • detail: Resolved at this head. TestPR83FailedPublicationRealFilesystemRestart grew a real ext4 filesystem from 128 to 192 MiB, forced record publication to fail, and confirmed that a second 128 MiB create was rejected against the 256 MiB budget. After a new driver claimed and recovered the same storage, create and restore admission still rejected the excess capacity. Retrying the original growth successfully published the record.
    • evidence_locator: /tmp/pr83-review-probes_test.go:52-76, TestPR83FailedPublicationRealFilesystemRestart; passing final overlay command in tests_run
    • file: internal/vm/firecracker_volume_resize.go
    • line: 220
    • state: answered

Tests Run

  • {"command":"go build ./... && go vet ./...","outcome":"Initial invocation failed with exit 127 because go was absent from PATH; the installed binary was located and used below."}
  • {"command":"go test ./internal/vm -run 'Test(FirecrackerVolume|LinuxHostResize)' -count=1 -v","outcome":"Initial invocation failed with exit 127 because go was absent from PATH."}
  • {"command":"/usr/local/go/bin/go build ./... && /usr/local/go/bin/go vet ./...","outcome":"PASS; both commands completed successfully."}
  • {"command":"/usr/local/go/bin/go test ./internal/vm -run 'Test(FirecrackerVolume|LinuxHostResize|FirecrackerColdBackup)' -count=1 -v","outcome":"PASS; all 18 selected tests passed. The startup-repair test noted that its root-only ownership check was not exercised."}
  • {"command":"/usr/local/go/bin/go test ./internal/vm -count=1","outcome":"PASS; complete VM package suite."}
  • {"command":"/usr/local/go/bin/go test -overlay /tmp/pr83-review-overlay.json ./internal/vm -run '^TestPR83DaemonDeathFencesRestart$' -count=1 -v","outcome":"PASS after correcting the external probe to arm the restarted driver's firewall before attempting attachment."}
  • {"command":"/usr/local/go/bin/go test -overlay /tmp/pr83-review-overlay.json ./internal/vm -run '^TestPR83(FailedPublicationRealFilesystemRestart|DaemonDeathFencesRestart|InFlightGrowthValidConcurrentCreate)$' -count=1 -v","outcome":"Final run exited 1: failed-publication/restart accounting and daemon-death fencing probes passed; valid concurrent create failed with '256 of 320 MiB used, a volume takes 128 MiB'. The same create succeeded after growth completed. Probes were injected through an out-of-tree Go overlay."}

Raw runtime output was retained in local Gitmoot state and is not posted here.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Addressing the P2 from review local-review-review-router-18e4c73f7724104d-1 (b96aebf) at 3683edc: in-flight growth was charged twice (extended disk file via max(record, file) plus the reserved growth). The grow reservation now carries (GrowFrom, GrowTo) and reserves only the not yet extended remainder; the extended part counts once through the disk file. TestFirecrackerVolumeGrowInFlightChargedOnce: budget 320, volume 128 growing to 192, a 128 MiB create is admitted during the grow and a further one refused; the old reservation turns it red (256 of 320 used, create refused). The reviewer confirmed the earlier P1 (flock fence) and P2 (unrecorded growth) fixes. go vet and go test -race ./... pass. Real Firecracker end to end still not verified.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Agent: g7-review
Runtime: omp
Job: local-review-review-router-18e4c8ad017262b2-1

Decision: changes_requested
Summary: Reviewed only b96aebf..3683edc and dependencies needed to validate the named findings. All three prior reproductions are resolved. One new P2 regression remains: reconciling logical growth reservations also prematurely releases physical disk headroom. Build, vet, the complete VM suite, and focused race checks pass; independent probes demonstrate the regression. No repository files were modified.
Severity: P2

Findings

  • Preserve disk headroom after extending a sparse volume file (P2)
    • detail: The new calculation drops the growth reservation once the disk file reaches GrowTo, but growDisk uses Truncate, which does not allocate the extended space. reservedVolumeMiB also supplies the physical disk-floor checks in CreateVolume, reserveRestore, and reserveGrowth. Those checks consequently stop protecting headroom while the filesystem tools still have allocations pending. An independent probe grew real ext4 from 128 to 192 MiB and paused before the tools: allocated blocks remained unchanged and the reservation became zero. With a deterministic free-space window based on actual allocated-block deltas, a valid concurrent 128 MiB restore was admitted at exactly the configured floor; completing resize2fs then consumed another 8192 bytes and crossed that floor. Keep logical volume-budget reconciliation separate from conservative physical-headroom reservations.
    • evidence_locator: /tmp/pr83-head-review_test.go:153-219, TestPR83ReviewGrowthDiskFloor and TestPR83ReviewGrowthRestoreCrossesDiskFloor; failing disk-headroom command in tests_run
    • file: internal/vm/firecracker_backup.go
    • line: 59
  • Filesystem tools survive daemon death and overlap a restarted volume attachment (P1)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f1
    • detail: Resolved in the independently executed daemon-death scenario at this head. The probe used the production driver and linuxFCHost filesystem-tool path, killed the owning process with SIGKILL, and successfully reclaimed its instance with a new driver. Attach, delete, backup, and grow returned ErrVolumeTransferBusy while the orphan helper retained the inherited disk lock. After the real resize2fs completed, the filesystem measured 192 MiB and attachment succeeded.
    • evidence_locator: /tmp/pr83-head-review_test.go:101-131, TestPR83ReviewDaemonDeathRestart; passing prior-finding overlay command in tests_run
    • file: internal/vm/firecracker_host.go
    • line: 156
    • state: answered
  • Failed growth releases capacity that the enlarged disk still consumes (P2)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f2
    • detail: Resolved in the independently executed failed-publication scenario at this head. The probe grew a real ext4 filesystem from 128 to 192 MiB and forced record publication to fail. Against a 256 MiB budget, create and restore admission rejected another 128 MiB both before and after a new driver claimed and recovered the storage. Retrying the original growth successfully published the 192 MiB record.
    • evidence_locator: /tmp/pr83-head-review_test.go:65-91, TestPR83ReviewFailedPublicationRestart; passing prior-finding overlay command in tests_run
    • file: internal/vm/firecracker_volume_resize.go
    • line: 222
    • state: answered
  • Do not count an in-flight disk extension twice against the volume budget (P2)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f3
    • detail: The original duplicate-charge reproduction is resolved at this head. Independent probes paused an actual 128-to-192 MiB growth after file extension and verified that concurrent create and restore admission accepted another 128 MiB against an exact 320 MiB budget. A separate case admitted growth of a second 128 MiB volume to 192 MiB against an exact 384 MiB budget. The repository's TestFirecrackerVolumeGrowInFlightChargedOnce also passed. The physical disk-headroom regression is reported separately.
    • evidence_locator: /tmp/pr83-head-review_test.go:132-152, TestPR83ReviewInFlightAdmission/{create,restore,grow}; internal/vm/firecracker_volume_resize_test.go:367-404; passing focused and prior-finding overlay commands in tests_run
    • file: internal/vm/firecracker_backup.go
    • line: 59
    • state: answered

Tests Run

  • /usr/local/go/bin/go build ./... — PASS.
  • /usr/local/go/bin/go vet ./... — PASS.
  • /usr/local/go/bin/go test ./internal/vm -run 'Test(FirecrackerVolume|LinuxHostResize)' -count=1 -v — PASS, including all growth tests and inherited-lock coverage.
  • /usr/local/go/bin/go test ./internal/vm -count=1 — PASS, complete VM suite.
  • /usr/local/go/bin/go test -race ./internal/vm -run 'Test(FirecrackerVolumeGrow|FirecrackerColdBackup|FirecrackerRestore|LinuxHostResize)' -count=1 — PASS.
  • /usr/local/go/bin/go test -overlay=/tmp/pr83-head-review-overlay.json ./internal/vm -run '^TestPR83Review' -count=1 -v — initial probe run FAILED: two probe-harness issues and the disk-headroom regression. Corrected only the temporary harness to tolerate restart cleanup and redirect orphan-helper output; subsequent commands below isolate the outcomes.
  • /usr/local/go/bin/go test -overlay=/tmp/pr83-head-review-overlay.json ./internal/vm -run '^TestPR83Review(FailedPublicationRestart|DaemonDeathRestart|InFlightAdmission)$' -count=1 -v — PASS, independently validating all three prior findings.
  • /usr/local/go/bin/go test -overlay=/tmp/pr83-head-review-overlay.json ./internal/vm -run '^TestPR83ReviewGrowth(DiskFloor|RestoreCrossesDiskFloor)$' -count=1 -v — FAIL, reproducing the new regression. Truncate left allocated blocks unchanged while reserved growth became zero; concurrent restore succeeded, then real resize2fs reduced modeled free space from the 4294967296-byte floor to 4294959104 bytes.

Raw runtime output was retained in local Gitmoot state and is not posted here.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Addressing the P2 from review local-review-review-router-18e4c8ad017262b2-1 (3683edc, which also confirmed the P1/P2/P2 fixes) at 35efbc3: Truncate is sparse, so the grow's physical space is only used while the tools run, yet the disk-floor check dropped the growth once the file reached its size. reservedVolumeMiB now returns two figures: budget (restores plus the not yet extended part of a grow; the extended part counts through the footprint) and headroom (restores plus each grow's WHOLE growth until it ends); the three disk-floor checks use headroom, the budget sums use budget. TestFirecrackerVolumeGrowKeepsDiskHeadroom: with the file already extended, a create that would eat 1 MiB of the grow's headroom is refused, one that leaves it is admitted; clamping headroom to the unextended remainder turns it red. go vet and go test -race ./... pass. Real Firecracker end to end still not verified.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Agent: g7-review
Runtime: omp
Job: local-review-review-router-18e4cabe5c753cd9-1

Decision: approved
Summary: Reviewed only 3683edc..35efbc3 and dependencies needed to validate the named findings. All four prior findings are resolved at the exact head; no new defects found in the scoped delta. Build, vet, focused regressions, race checks, the complete VM suite, and independent native-ext4 scenarios passed. No repository files were modified; independent probes used a temporary external Go overlay.

Findings

  • Filesystem tools survive daemon death and overlap a restarted volume attachment (P1)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f1
    • detail: Resolved at this head. TestPR83CurrentDaemonDeathRestart exercised the production driver and linuxFCHost tool execution with a gated resize helper. After SIGKILL of the owning process, a new driver reclaimed the instance but attach, delete, backup, and grow all returned ErrVolumeTransferBusy while the orphan helper retained the inherited disk lock. After real resize2fs completed, e2fsck verified a clean 192 MiB filesystem and attachment succeeded.
    • evidence_locator: /tmp/pr83-current-review_test.go:159-207, TestPR83CurrentDaemonDeathRestart; final overlay command in tests_run
    • file: internal/vm/firecracker_host.go
    • line: 156
    • state: answered
  • Failed growth releases capacity that the enlarged disk still consumes (P2)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f2
    • detail: Resolved at this head. TestPR83CurrentFailedPublicationRestart grew real ext4 from 128 to 192 MiB and forced record publication to fail. Against a 256 MiB budget, create and restore rejected another 128 MiB both before and after a new driver claimed and recovered the storage. Retrying growth successfully published the 192 MiB record. The filesystem passed native e2fsck.
    • evidence_locator: /tmp/pr83-current-review_test.go:116-143, TestPR83CurrentFailedPublicationRestart; final overlay command in tests_run
    • file: internal/vm/firecracker_volume_resize.go
    • line: 222
    • state: answered
  • Do not count an in-flight disk extension twice against the volume budget (P2)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f3
    • detail: Resolved at this head. TestPR83CurrentNativeAdmission paused real 128-to-192 MiB growth after sparse file extension. Concurrent create and full restore accepted another 128 MiB against an exact 320 MiB budget. Concurrent growth of a second 128 MiB volume to 192 MiB succeeded against an exact 384 MiB budget. Additional creates exceeding those budgets were rejected. The repository regression also passed with and without the race detector.
    • evidence_locator: /tmp/pr83-current-review_test.go:73-115, TestPR83CurrentNativeAdmission/{create,restore,grow}; internal/vm/firecracker_volume_resize_test.go:367-404; final overlay and race commands in tests_run
    • file: internal/vm/firecracker_backup.go
    • line: 63
    • state: answered
  • Preserve disk headroom after extending a sparse volume file (P2)
    • continues_uid: Grow detached Firecracker volumes (POST /volumes/{id}/resize) #83-f4
    • detail: Resolved at this head. Independent native-ext4 probes confirmed that extending the file from 128 to 192 MiB allocated no additional blocks. While filesystem tools were paused, create, restore, and second-volume growth each rejected free space one MiB below the required floor plus incoming allocation plus the complete 64 MiB growth reservation. Each accepted the exact boundary. Completing real resize2fs subsequently allocated another 8192 bytes, confirming that physical headroom remains protected while allocation is pending. Logical-budget admission remained correct.
    • evidence_locator: /tmp/pr83-current-review_test.go:73-115, TestPR83CurrentNativeAdmission/{create,restore,grow}; internal/vm/firecracker_volume_resize_test.go:409-453; final overlay command in tests_run
    • file: internal/vm/firecracker_backup.go
    • line: 64
    • state: answered

Tests Run

  • {"command":"env PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin go build ./...","outcome":"PASS."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin go vet ./...","outcome":"PASS."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin go test ./internal/vm -run 'Test(Firecracker.*(Volume|Backup|Restore)|LinuxHostResize)' -count=1 -v","outcome":"PASS. Focused volume, backup, restore, growth, and inherited-lock regressions passed."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin go test -race ./internal/vm -run 'Test(FirecrackerVolumeGrow|LinuxHostResize|FirecrackerRestoreReservesQuotaAndName)' -count=1 -v","outcome":"PASS. No race reports."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin go test ./internal/vm -count=1","outcome":"PASS. Complete VM package suite."}
  • {"command":"env PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin go test -overlay /tmp/pr83-current-review-overlay.json ./internal/vm -run '^TestPR83Current' -count=1 -v","outcome":"Initial run: native admission scenarios passed; restart probe failed because its harness attempted to remove a temporary blocker already removed by production startup recovery. Corrected only the external harness expectation. Final run: PASS for create/restore/grow boundary scenarios, failed-publication recovery and retry, and SIGKILL/restart fencing. Native dumpe2fs and e2fsck verified clean 192 MiB filesystems."}

Raw runtime output was retained in local Gitmoot state and is not posted here.

@jerryfane

Copy link
Copy Markdown
Contributor Author

Independent exact-head review APPROVED at 35efbc3: g7-review job local-review-review-router-18e4cabe5c753cd9-1, evidence=executed, no new findings. Four findings across three review rounds, all answered by executed probes: P1 filesystem tools outliving a killed daemon (flock inherited by the tools; attach/delete/backup/grow busy while held; real SIGKILL scenario), P2 unrecorded growth released from the budget, P2 in-flight growth charged twice, P2 sparse-file disk-floor headroom released early. Reviewer ran build, vet, focused regressions, race checks, the full VM suite and independent native-ext4 scenarios. Implementer was the sandboxd seat (same model family as reviewer disclosed). Both CI jobs pass; level3_required rechecked at this head. Merging with an exact-head guard under the existing assignment. Not verified: a real Firecracker volume end to end with the daemon (attach after grow, guest seeing the larger filesystem); no shared deployment.

@jerryfane
jerryfane merged commit b3f5d10 into main Nov 4, 2026
3 checks passed
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