Repository navigation
review: whole-repo round on #285 (orphan sweep fix, FC detach check, deps, docs) - #286
Merged
Merged
Conversation
The scan that feeds the orphan sweep predates the force stop. A process that exited during the stop but is not yet reaped, such as Cloud Hypervisor's direct-boot pty child, still answers kill(0), so the sweep logged "killed orphan VMM" for a process TerminateProcess then left alone. Match the cmdline instead, as the start path does.
Cloud Hypervisor rejects an invalid detach name up front, while Firecracker took the ops lock and queried the VMM first, then reported success for a name that could never have been attached. Validate it the same way on both backends.
DoWithRetry ranges over its attempts, the arm64 kernel gunzip check reuses utils.GzipMagic, storebench seeds through slices.Chunk, the image index write reuses the bytes it already marshaled for the diff, and size backfill reads the record's own data dir like the missing-dir check. The TypeRegA branch was dead: archive/tar rewrites it to TypeReg on read.
The gc policy tests parse the real gc command instead of a hand-copied flag set, the CH tests share the in-process handler transport instead of a second TCP stub client, the clone config test drops a flag the function never reads, and the ReverseLayers tests compare with slices.Equal.
…ebug-ignored cgroup flags
…ls with utils.WaitFor
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.
Whole-repo review round on top of #285: every Go file (tests included), README and docs read in full against the code, dependencies and lint tools bumped.
Fixes
deleteOneLockedwalks a process scan taken before the force stop. A process that exited during the stop but is not yet reaped (Cloud Hypervisor's direct-boot pty child shares the VMM cmdline) still answerskill(0), so the sweep logged a kill thatTerminateProcessthen skipped on the cmdline check. The sweep now matches the cmdline, like the start path'sscanFor. Regression testTestDeleteSkipsAScannedVMMThatExitedBeforeTheKill(Linux) fails without the fix and passes with it.disk.ValidateNamebefore locking.Cleanup (no behavior change)
DoWithRetryusesrange MaxRetries + 1; the arm64 kernel gunzip check reusesutils.GzipMagic; storebench seeds viaslices.Chunk.tar.TypeRegAbranch dropped (archive/tarrewrites it toTypeRegon read).gccommand instead of a hand-copied flag set; the CH tests share one in-process handler transport instead of a second TCP stub; one dead fixture flag removed;slices.Equalreplaces hand-written loops.SnapshotExport, stray blank lines removed, staleomitemptycomment corrected. Net comment count unchanged.Docs
vm disk attach --from-snapshot/--from-diradded where it was missing: the README highlights, the CLI tree, the devices intro, the index, snapshots (--to-dirconsumers), and the known-issues sections on runtime-only devices and snapshot refusal.vm debugdoc now lists the cgroup CPU flags it ignores with a warning, matching the code.Dependencies
go get -u ./... && go mod tidy: klauspost/compress v1.20.3, projecteru2/core v0.1.7, x/sync v0.24.0, x/sys v0.49.0, modernc.org/sqlite v1.60.1, plus indirect bumps. golangci-lint v2.14.0 (Makefile and lint workflow), gofumpt v0.12.0, goimports v0.51.0. google/uuid stays: the Go 1.27 stdlib uuid has no v5/NewSHA1.Skipped, with reasons
sync.Oncesingletons incmd/coreandBackend.topoOnce: their init takesconf/ctx, and tests reset them or build zero-valueBackendliterals, soOnceValuedoes not fit.forwarderfindings (instanceStart,pauseVM,quoteIdent) are recorded as kept in the hygiene ledger.LOC
Verification
make lint:0 issues.for both GOOS=linux and GOOS=darwin.make fmt-checkclean.asl ./...(both GOOS) reports only the three advisory forwarders above.go test ./...passes on darwin.go test -race ./...passes ingolang:1.27.1linux/arm64: 38 packages ok, 0 FAIL.