Repository navigation
T151 — The VM host never mirrors a node's own listener - #2967
norrietaylor merged 1 commit into
Conversation
NodeMirror now keeps the node's own ports as host-side state and leaves them out of every bind path. A port held before the node row claimed it is unbound and forgotten. Each mirrored bind names the host-address boxes published on the node.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to design §7.1. The mirror now binds only the binds of host-address boxes (line 254). It takes the node's own ports from records that the host holds (line 244). A port that the mirror held before the node row stood is unbound, and no later bind takes it again. No conditions.
Ruled at 251a1de against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
Reviewed 251a1dea against T151's plan block. NodeMirror now takes the node's own ports from guest_infrastructure_ports, leaves them out of the mirror and unbinds any it held, and the cohort records which boxes are published. node_own_listener_never_mirrored pins it, and arch-review passes on this head.
T151 — The VM host never mirrors a node's own listener
slice: S18
kind: task
covers: NET-138
size: S
est: 40 code, 60 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: a person reads the minvmd log on the host, where each mirrored bind names the host-address box it belongs to
observability: the node mirror logs at debug each bind it mirrors and each listener it leaves out
layers:
- mirror:
- crates/minvmd/src/box_registry.rs:
NodeMirrormirrors only binds attributed to a host-address box, and leaves a listener of the node's own, such as the hostname proxy or the in-VM daemon's sockets, unmirrored at the node's addresstest: cargo nextest run -p minvmd node_own_listener_never_mirrored
produces: none
consumes: none
proof: On a VM host, the node's own listeners in the host-address namespace are never reachable at the node's address through the mirror.
Proof
On a VM host, the node mirror never binds a listener of the node's own at the node's address. This includes the hostname proxy port and the in-VM daemon's sockets. A port the mirror held before the node row claimed it is unbound, and no probe pass or new host-address box binds it again. node_own_listener_never_mirrored shows this. The binds of the host-address boxes stay.
Notes from the agent: The gap: the mirror checked the node's own ports only on a listening notice. bind_wanted (probe pass, address open, first box publication) did not check them, and a port held before the node row registered stayed bound. NodeMirror now keeps the node's own ports (node_own) and filters bind_wanted with them. try_register_node_namespace refreshes them from guest_infrastructure_ports, and so does every notice. The refresh unbinds and forgets a port that becomes the node's own. Diagnostics: the info line for each mirrored bind now carries host_address_boxes, the published host-address boxes. The guest's ListenNotice has only a port, so the line names the cohort that shares the namespace, not one box. set_published now takes the resident box ids in place of a bool. Observability: each listener left out logs at debug. Binds stay at info, which is above the debug the task asks for. Also ran: cargo nextest run -p minvmd mirror (13 passed) and cargo clippy -p minvmd --all-targets (clean).
Tests
cargo nextest run -p minvmd node_own_listener_never_mirroredVerify
min task run agent-verifypassed ([tasks.verify]).Closes #2939