Repository navigation
T123 — A host-address box's name answers its node's address on a VM host - #2831
norrietaylor merged 13 commits into
Conversation
On a VM host, a held host_ip name now answers the node's reserved-range address while its session is a resident host_ip box and the node's binds are mirrored. It answers NODATA otherwise, and again when the box ends. The publish marks such rows as the node's address, so the machine's answer service holds several names at it and no box's release frees it. The registry gains read accessors for held names and the mirrored address, and pings the answerer when residency or the mirror changes.
The VM host decides what a host-address box's name answers there, so the in-VM daemon's zone table leaves the address to it.
The VM host answerer case now activates two host_ip boxes, checks that both names answer the node's one reserved-range address, and opens a port each binds there with no proxy setting.
…ress-box-s-name-answers-its-node-s-add
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
…ress-box-s-name-answers-its-node-s-add
A macOS host carries the reserved range on lo0 only after min finalize-install. Without it the node's binds are not mirrored, and a host-address box's name answers NODATA, as the task specifies. The VM host answerer case now reads the range state first and asserts the node address and open ports only where the range is present.
|
Round 1 of 10 on a failed check suite, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. On a macOS host that carries the reserved range (after min finalize-install), http://.min.internal: for a host_ip box opens the port the box binds at the node's one 127.0.64.N address, with no proxy setting. On a macOS host without the range, the name answers NODATA and the e2e case now asserts exactly that. Notes from the agent: Revise round 1. The macOS e2e failed because the case required an address for e2e-answerer-ha1.min.internal on a runner whose lo0 does not carry 127.0.64.0/24. No min finalize-install ran there. Without the range the node mirror never opens, so mirrored_address() is None, and NODATA is the answer the task specifies ("NODATA ... while the node's binds are not mirrored"). The Linux KVM lane, where all of 127/8 is on lo, did not fail. The fix is in scripts/session-e2e.sh only. The case reads the range from ifconfig lo0, the way the macOS ingress case does. With the range it keeps the address and port checks. Without it, it asserts NOERROR with no A record, which is NODATA and not NXDOMAIN. ci-macos-success is the lane aggregator over that e2e job, so it needs no separate change. I did not observe the CI dig output, because the excerpt cut it. The diagnosis comes from the code path and the lane difference, and the next macOS run confirms it. On the macOS lane the port-opening half of the proof runs only where the runner has the range. Deferred: ./scripts/session-e2e.sh native_resolution_from_host_answerer_on_vm_host (lane: vm), not run here. Outside the layers: an earlier round changed crates/minvmd/src/box_registry.rs (held_name_owners, mirrored_address, and pings on admit, retire and mirror open). The answerer needs them. This round did not touch it. |
|
/revise The macOS lane fails at d58218a in
The same test passes on #2830 and #2832, whose bases are the same or newer, so this branch most likely causes it. This PR changes the path the test exercises:
Find out why a frame from a resident host_ip box no longer reaches its admitted destination after these changes. Check whether the ticket ordering delays or reorders residency relative to the frame, and whether the ping rebuilds a table the gate reads mid-flow. Fix it so the test passes unchanged. Keep NET-129: the name answers the node's address only while the box is resident and the binds are mirrored. Run |
…ress-box-s-name-answers-its-node-s-add
The answerer reads the name holds and the resident host_ip set together when it builds its view, so the order of a hold and an admit cannot change a host-address name's answer (NET-129). The ticket was not needed, and it moved the admit and the retire off the path the VM escape test exercises.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. On a macOS host, http://.min.internal: for a host_ip box opens the port the box binds, with no proxy setting. This round makes no change to that behaviour. It only puts AdmitHostIpBox and RetireHostIpBox back on their pre-branch path, without a ticket. This box cannot show the proof, because it has no VM lane. Notes from the agent: Revise round 2. I looked for the cause of the vm_escape_bounded_to_resident_union failure and did not find one in this branch. (1) Ticket: order.apply runs the admit synchronously before the reply is written. The test waits for that reply before it sends the marked frame, so the ticket cannot delay or reorder residency relative to the frame. A long wait would fail the test at the admit's 30 s read timeout, not at line 2048. (2) Ping: BoxRegistry::ping only sends () on the channels of the two subscribers, the answerer acquire loop (answerer.rs) and the zone dump (diag.rs). Neither rebuilds anything the gate reads. host_ip_verdict reads table.host_ip_boxes() live under the resident lock. The answerer's republish only takes read locks, one at a time. (3) The guest dns.rs change affects only host_net boxes that the guest daemon registers, and the test admits its host_ip boxes on the host socket directly. Change made: AdmitHostIpBox and RetireHostIpBox no longer take a ticket. The answerer builds the answer from the holds and the resident set each time it builds its view, so the order of a hold and an admit cannot change it. NET-129 still holds: the name answers the node address only while the session is resident and mirrored_address() is Some. The pings stay, because the cross-process publish needs them to carry the change before the PORT_RECHECK cadence. I was not able to run the VM test here (no /dev/kvm, the binary is not built on Linux), so it is still unverified whether this round fixes the macOS failure. If the test still fails, the next step is the gate account from the failing job (gate_account output), which …[truncated] |
|
Revise round 1 ran against |
|
/revise Round 2 (5b3430d) took the ticket off admit and retire, and the macOS lane still fails the same test in the same way (job 124785897525,
So the ticket was not the cause. This test runs only on the macOS VM lane: the KVM lane passes, and its log does not run it. That is why your sandbox does not see it. Before you push, reason from the code about what this branch changes on that test's path. These are the remaining changes it could hit:
Read |
|
Round 3 of 10 on a /revise note: the coder changed nothing. Round 3: I found no cause on this branch for the macOS VM lane failure in vm_escape_bounded_to_resident_union (crates/minvmd/tests/vm_escape_integration.rs:2048). The directive says not to push a speculative change, so this round changes nothing. Ruled out, from the code:
|
|
/revise Make The test fails only on the macOS VM lane at this branch (jobs 124757386483 and 124785897525,
Keep the test's assertion unchanged. Run this task's test lines. Say in the PR body that this round is diagnostic and that the cause comes from the next macOS lane run. |
…ress-box-s-name-answers-its-node-s-add
Diagnostic only, for the macOS VM lane failure in vm_escape_bounded_to_resident_union. The gate logs at debug, under its own target, the verdict and rule for each box-marked frame that opens a flow, with the resident host_ip set and the cohort record it read. The host_ip admission line carries the mirrored node address. The test checks the host_ip drop line before the arrival assert, and the arrival assert's message quotes the flow's gate lines, the marked-frame decisions, the mirrored address, backpressure drops and the zone dump.
…ress-box-s-name-answers-its-node-s-add
|
Round 4 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. This round is diagnostic only and does not change the proof. When vm_escape_bounded_to_resident_union fails again on the macOS VM lane, its failure message will say why the admitted box-marked frame did not arrive. The message quotes the gate's verdict, its rule and the decision arm, the resident host_ip set and cohort record at that frame, the mirrored node address at each host_ip admission, the backpressure drops and the zone-table dump. The cause comes from the next macOS lane run. The task's proof (http://.min.internal: opens a host_ip box's port on macOS with no proxy setting) still waits on that lane. Notes from the agent: This round is diagnostic. Put that in the PR body: the cause of the vm_escape_bounded_to_resident_union failure comes from the next macOS lane run. Product behaviour does not change. The one new log line is at debug, under its own tracing target (minvmd::egress_gate::marked), so it is off at the default info filter. Files outside the task's layers, touched because the /revise note asks for them: crates/minvmd/tests/vm_escape_integration.rs (the test), crates/minvmd/src/net/egress_gate.rs (item 3: the gate had no line for an admitted box-marked frame, and none for a marked frame that reaches the source-row arm), and crates/minvmd/src/box_registry.rs (an earlier round on this branch already changed it; this round adds mirrored_address to the host_ip admission info line). What each item became:
|
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review of 0270f75 against T123. vm_escape_bounded_to_resident_union, which failed on this branch's macOS lane at d58218a and 5b3430d, passes at this head (35 s) after the diagnostic round (6be9b87) and two merges from main. The cause of the earlier failures was not found. The new diagnostics stay: a debug line on its own target (minvmd::egress_gate::marked), written only for a flow's opening frame, plus richer failure messages in the test. A recurrence will now say why. Diagnostics aside, the change matches the T123 plan block: a host-address name answers its node's address only while the box is resident and the binds are mirrored, and NODATA otherwise. All lanes are green.
|
Approved: every review thread resolved at @norrietaylor resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 3 conditions · the full ruling
The answer is in the right owner. minvmd builds it from host-door residency and the node mirror, and minimald reports no address (§7.1 lines 244, 255, 261). Three gaps stay. C1: a range-probe change does not ping, so the answer service keeps a stale address for up to 30 s (line 255). C2: the diag zone dump disagrees with the answer. C3: the deferred VM e2e leg did not run, and it is the only proof that the port opens. The keep residency gap is a residual under #2747.
Ruled at 0270f75 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
/revise Arch C1 and C2 on 0270f75 (arch_rulings 780).
Keep the diagnostic logging from 6be9b87. Leave C3, the VM-lane run with the reserved range on lo0, to the babysitter. Run this task's test lines. |
…ress-box-s-name-answers-its-node-s-add
A failing whole-range probe now pings the table at once, so the installed answer service drops the node's address with no recheck wait. The zone-table dump reads the answerer's own view, so it shows the node address a lookup answers.
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The compare closes the two open items from the last head. A failing range probe now republishes NODATA at once, as §7.1 line 255 requires. The zone dump now shows the address that a lookup answers. NET-009 and NET-129 conform. The VM e2e leg is still deferred and did not run. Run it on a VM lane and record the result (C1).
Ruled at d3dfa9d against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 4 unresolved threads — minimal-arch[bot] crates/minvmd/src/box_registry.rs:6588, minimal-arch[bot] crates/minvmd/src/net/answerer.rs:2606, minimal-arch[bot] scripts/session-e2e.sh:8950, minimal-arch[bot] scripts/session-e2e.sh:8943. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
Round 5 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
On a macOS host, http://.min.internal: for a host_ip box opens the port the box binds, with no proxy setting. This round makes the name fall back to NODATA at once when the range probe fails, and makes the zone-table dump show the same node address that a lookup answers. Only the VM lane can show the port open at the node address on macOS. That run is deferred and did not happen on this box. Notes from the agent: Round 5 did C1 and C2 from the /revise note. C1: added BoxRegistry::set_node_range_probe. It pings the table when mirrored_address() changes, and it logs the change at debug. run.rs node_mirror_pass() now calls it. The host_address_name_answers_node_loopback_on_vm_host test now asserts that a failing verdict pings, that a repeated failing verdict does not ping, and that a passing verdict pings. C2: own_zone_view is now pub(crate), and diag.rs write_table() builds its rows from it. The module doc now says that. The test also asserts that own_zone_view carries the node address for the held name. Scope: box_registry.rs, cmd/run.rs and diag.rs are outside the task's layers. The /revise note asked for these changes by name. box_registry.rs and egress_gate.rs were already in the diff from earlier rounds. The diagnostic logging from 6be9b87 is unchanged. C3 is not done, as the note directs: the deferred test ./scripts/session-e2e.sh native_resolution_from_host_answerer_on_vm_host (lane: vm) did not run here. native_resolution_without_proxy_env exited 0 but skipped its proof, because the daemon on this box never owned the zone answerer ports. The PR body's 'open' note about C2 is the runner's to remove. I cannot edit the PR body. |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter review of d3dfa9d. Arch C1 is met: set_node_range_probe pings only when mirrored_address() changes, node_mirror_pass() calls it, and the test asserts both a ping on a failing probe and no ping on a repeated verdict. C2 is met: diag.rs dumps own_zone_view, and the test asserts that the dump and a lookup agree. I am running C3 (the reserved-range VM run) locally and will record it in the PR body.
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of d3dfa9d7c12c withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
The session e2e now takes main's test-kvm to 28.5 of its 30 minutes (merge-queue run 41673262055 for gominimal#2824). Queue runs for gominimal#2831 and gominimal#2819 were cancelled at the limit while the e2e still made progress, and the queue dequeued both PRs.
T123 — A host-address box's name answers its node's address on a VM host
slice: S18
kind: task
covers: NET-009, NET-129
size: L
est: 180 code, 380 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: a person reads
min ls, whose address column shows the node's address for everyhost_ipbox on a VM, and the minvmd log line for each zone answer changeobservability: the zone answer for a host-address name logged at debug with the address it carried, or NODATA and why
layers:
- answerer:
- crates/minvmd/src/control.rs:
hold_box_namestops being the NODATA interim for a running host-address box whose node's binds are mirrored, and records the name against the node row- crates/minvmd/src/net/answerer.rs: answers every host-address box's name on a VM node with the node's one address; NODATA while the box is not running, read at the host's end of the attachment, and while the node's binds are not mirrored; the name returns to NODATA when the node's last running host-address box ends
test: cargo nextest run -p minvmd host_address_name_answers_node_loopback_on_vm_host
test: cargo nextest run -p minvmd two_host_address_boxes_answer_one_node_address
- guest:
- crates/minimald/src/net/dns.rs: the in-VM daemon reports no address for a host-address name; the host decides the answer
test: cargo nextest run -p minimald host_ip_box_answers_node_loopback_address
- e2e:
- scripts/session-e2e.sh: the VM host answerer case asserts that two host-address boxes on one VM answer the same node address and that a port each binds opens at it
test (deferred: vm): ./scripts/session-e2e.sh native_resolution_from_host_answerer_on_vm_host
test: ./scripts/session-e2e.sh native_resolution_without_proxy_env
produces: none
consumes: none
proof: On a macOS host,
http://<name>.min.internal:<port>for ahost_ipbox opens the port the box binds, with no proxy setting.depends on:
- blocked by #2699
Proof
On a VM-backed host (macOS), the VM host daemon's answerer now answers .min.internal for a running host_ip box with the node's one reserved-range address, which is where the host mirrors the node's binds. So http://.min.internal: opens the port the box binds, with no proxy setting. Two host_ip boxes on one VM answer the same address. The name answers NODATA while the box is not running or the binds are not mirrored, and again after the node's last host_ip box ends. The unit tests prove the answers. Only the deferred VM e2e case proves the port opening on a real host, and it was not run here.
Notes from the agent: Outside the layers: crates/minvmd/src/box_registry.rs. The answer needs registry state that had no public read. I added BoxRegistry::held_name_owners, NodeMirror::mirrored_address (address open, range probe passing, binder set), and table pings when a host_ip box is admitted or retired and when the node mirror opens. Without the pings, a publish to the installed answer service waits for the 30 s cadence. I also changed one info log line: it said a held name 'answers NODATA', and that is no longer always true. Two items stay open. (1) A change in the range probe verdict does not ping, because NodeMirror holds no ping sender and run.rs is out of scope. The service sees that change within the 30 s PORT_RECHECK cadence. The interim holder sees it at once, because it builds its view for each lookup. (2) The diag zone dump (minvmd diag.rs) still reads BoxRegistry::zone_view, so it shows held host-address names with no address. The answerer and its publish use the new fold. Design: 'running' is read as the host_ip residency that the CLI's attachment admits and retires. A residency that HostIpResidency::keep keeps for a stopped box still answers the address. Issue #2747 owns that gap. A hold with no session id (an older client) always answers NODATA. Wire: RegisteredRow gains an optional node_address flag (serde default, left out when…[truncated]
Tests
cargo nextest run -p minvmd host_address_name_answers_node_loopback_on_vm_hostcargo nextest run -p minvmd two_host_address_boxes_answer_one_node_addresscargo nextest run -p minimald host_ip_box_answers_node_loopback_address./scripts/session-e2e.sh native_resolution_without_proxy_env./scripts/session-e2e.sh native_resolution_from_host_answerer_on_vm_hostVerify
min task run agent-verifypassed ([tasks.verify]).Base
The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:
scripts/session-e2e.shDeferred
None. The deferred VM line ran on a local macOS host at d3dfa9d with the reserved range present (Tests above). It took the node-address branch, not NODATA.
Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minvmd/src/box_registry.rsCloses #2706