net: scope host TAP/netns families under net_scope "cm" - #25
Merged
Conversation
Bump cocoon to master (net_scope): bridge.CleanupTAPs now takes the TAP prefix, and config.Config carries NetScope. cocoon-macos builds its network config once (netConf) with NetScope "cm", so its auto-created TAPs (cm<vmid8>-<nic>) and CNI netns (cm-<vmid>) are a separate name family from a co-hosted cocoon's — neither side's GC or cleanup can reclaim the other's live guests. e2e.sh cleanup/leak checks follow the new family (and match the base32 VM IDs the old hex pattern never did). No dual-prefix transition.
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.
Why
cocoon's GC and cleanup identify bridge TAPs and CNI netns by host-wide name family (
bt<vmid8>-<nic>,cocoon-<vmid>). Sharing that family meant a co-hosted cocoon daemon could reclaim a live macOS guest's TAP as an orphan (and vice versa). cocoon master now keys the families per installation vianet_scope(cocoonstack/cocoon#196).What
github.com/cocoonstack/cocoonto master (cde2318) andgo mod tidy.cmd/vm/net_linux.go: onenetConf(cmd)builder for the cocoon network config withNetScope = "cm", shared by provider construction and rm teardown;bridge.CleanupTAPstakes the scoped prefix.cm<vmid8>-<nic>/cm-<vmid>. No dual-prefix transition: devices created by earlier builds are not cleaned up by this one.scripts/e2e.sh: cleanup + leak checks follow thecmfamily (the oldbt[0-9a-f]pattern never matched the base32 VM IDs, so the leak check was vacuous).docs/networking.md: document the family.review:commit joins every wrapped multi-line//comment to one line (no content change).Verification
go build ./.../GOOS=linux go build ./...,go vetboth GOOS,go test ./...greenmake lint(golangci-lint, linux + darwin): 0 issuesasl ./...both GOOS: cleanbash -n scripts/e2e.sh