Skip to content

review: whole-repo round — net rollback, stray-helper reap, NBD busy check, VNC password rules; pin cocoon - #39

Merged
CMGS merged 3 commits into
masterfrom
review/night-2026-09-03
Sep 2, 2026
Merged

review: whole-repo round — net rollback, stray-helper reap, NBD busy check, VNC password rules; pin cocoon#39
CMGS merged 3 commits into
masterfrom
review/night-2026-09-03

Conversation

@CMGS

@CMGS CMGS commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Whole-repo quality round for cocoon-macos, plus the cocoon dependency pinned to its merged head.

Correctness:

  • provisionNet rolls its netns back on failure through one toggleNet helper (Quiesce/Unquiesce as method expressions).
  • createVM reaps stray qemu / qemu-nbd helpers that reference the VM dir before a relaunch.
  • The NBD busy check reads /proc/*/cmdline through readProcCmdlines and processReferencesBlockDevice (tested with a fake proc root; a /dev/nbd0 pattern no longer matches /dev/nbd01).
  • VNC passwords reject whitespace; the proxy binary name is resolved once.
  • clone inherits the source's network mode unless --net is given (help text updated).
  • OpenStore takes the caller's context; resolveBase threads it.

Dependency: cocoon v0.6.2-0.20260902190340-51ff88bcf8f1 (merged head of #208) — ReflinkCopy takes a context, Network.Delete takes a single id and returns only an error, the image JSON namespace comes from core.ImageJSONNamespace.

Style and docs: comment budget applied, one-line comments, docs/networking.md and the clone help describe the inheritance.

Gates: GOWORK=off make lint (0 issues on linux and darwin), make fmt-check, asl ./... on both GOOS, go test -race -count=1 ./... (all ok), go build on GOOS=linux and darwin.

CMGS added 3 commits September 3, 2026 03:09
…check, VNC password rules; pin cocoon 51ff88b

provisionNet rolls its netns back through a shared toggleNet; createVM reaps
stray qemu/qemu-nbd helpers by cmdline before relaunch; the NBD busy check
reads /proc cmdlines through a testable seam; VNC passwords reject whitespace;
clone inherits the source's network mode unless --net is set; OpenStore takes
the caller's context. cocoon is pinned to its merged head (ReflinkCopy takes a
context, Network.Delete takes one id, the image JSON namespace comes from
core.ImageJSONNamespace).
… resolve the proxy name once

A VM dir needle without its separator also matched foo-clone's processes;
vmDirPrefix carries the slash for every cmdline scan. A bridge-mode clone
inherited the mode but not the bridge, so applyNet refused it. The VNC proxy
name is resolved once per process, the clone inheritance is documented, and
the last test narration is gone.
@CMGS
CMGS merged commit 6ed8ec6 into master Sep 2, 2026
3 checks passed
@CMGS
CMGS deleted the review/night-2026-09-03 branch September 2, 2026 19:36
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