Repository navigation
fix(mount): check broadcast ports before changing anything on disk - #61
Merged
Merged
Conversation
A taken broadcast port only failed the mount after it had formatted (with -format), claimed a registry slot and set up its journal. broadcast.CheckPorts now opens and releases the same sockets Start uses, through the same listen helper, before the mount opens the device. The fatal after Register stays as the backstop for a process that binds the port in between. The docs now say that each mount on a host needs its own -unicast-port and -api-addr, and that clusters sharing a LAN need their own -mcast-group or a -broadcast-secret. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mattmattox
force-pushed
the
claude/broadcast-precheck
branch
from
November 12, 2026 07:10
96d0c76 to
fb0c5fc
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Stacked on #59; retarget to main once #59 merges. These are the shepherd's three follow-ups from the #59 review.
-format), claimed a registry slot and set up its journal.broadcast.CheckPortsnow opens and releases the same socketsStartuses, through one sharedlistenhelper, before the mount opens the device. The fatal afterRegisterstays as the backstop for a process that grabs the port in between.-unicast-portand-api-addr. Clusters sharing a LAN need their own-mcast-groupor a-broadcast-secret.Tests:
TestMountFailsOnTakenBroadcastPortBeforeFormatholds the unicast port and runsmount -format. The mount must exit with the broadcast error and leave the image's first 4 KB zero. Without the pre-check it fails: "mount wrote the superblock before failing on the broadcast port".CheckPortsunit tests: it releases its sockets, fails on a taken port, and rejects equal ports.On .68, the broadcast unit tests pass 3× with
-race, and the broadcast, API and mount integration tests (16) all pass.🤖 Generated with Claude Code