rented gateway: the _acme-challenge delegation is written once at control-plane boot and never retried — a lost race against acme-dns-register leaves a permanently dead TLS door (#915's fix is a no-op on this path) #921
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#921
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failure
Drive
20260828T031915Z(targetdevice, commit6fc7fba1) red at legactivation(bubbled up asstanding), signature25304f657c24— the third drive lost to this signature.artifacts/legs.json— 15 green,activationred at 650684 ms;artifacts/verdict.jsonfirstRedLeg: standing.Evidence
logs/founding-state.log:60-73—deploy.outcome: "failed", and the ONLY failed step ispublic-entry;control-plane,dashboard,brand,adminandmeshare alldone.logs/founding-state.log:633-637names the kind and the remedy:The probe log runs
probe 1/120→probe 119/120at 5 s (founding-state.log:142-618) — ~600 s, which is the bulk of the leg's 650 s.Live DNS on the still-standing droplet confirms the delegation was never written:
That is byte-for-byte the record set
broker/internal/broker/zone.go:206-228writes whenrec.AcmeChallengeis empty — theif c := strings.TrimSpace(rec.AcmeChallenge); c != ""guard atzone.go:209never fired.The defect
On the rented path the delegation is written by exactly one thing, once, with no retry:
The app's pre-install point writes it empty by design.
internal/founding/rentedpath.go:200-203→internal/founding/ownvpspath.go:509:with the comment at
ownvpspath.go:506-508: "the box is not installed yet, so it publishes no acme-dns fulldomain… The gateway's heartbeat re-points with the challenge once it is up (ADR 0136)". The whole repair is delegated to the heartbeat.The heartbeat is the sole writer.
control-plane/cmd/control-plane/main.go:578-579:readAcmeChallenge()(main.go:612-618) is a single best-effortos.ReadFileofclan.AcmeDNSFulldomainFact(internal/clan/acmedns.go:60=/var/lib/idss-acmedns/fulldomain); absent →"".The heartbeat only ever re-points on ADDRESS drift.
internal/heartbeat/heartbeat.go:260:liveis the<slug>A record (main.go:582-585,dns.AuthoritativeReader). Nothing inTickreads or reconciles the_acme-challengeCNAME the heartbeat is the only writer of.So the write happens exactly once, at the worst moment.
Heartbeat.Run(heartbeat.go:221) ticks IMMEDIATELY at control-plane start, then everyaddressHeartbeatInterval= 5 min (main.go:86).IDSS_GATEWAY_IPis never exported by any render (grep across*.go/*.nixfinds only the two consumer sites inmain.go), soWithKnownIPis unset,lastIP == "", and the very first tick re-points. Ifacme-dns-registerhas not yet published the fulldomain at that instant, that one write carries""— thenmarkPointedsetslastIP, and from the 5-minute tick onwardip == lastIP && live == ipholds forever. The delegation is never written for the life of the community.The consequence is a guaranteed dead door. The #554 delegation gate (
internal/clan/acmedns.go:326-367) polls the CNAME for ~5 min then FAILS OPEN (acmedns.go:363-366), so Caddy starts and burns DNS-01 orders against a delegation-less name;:443never serves;public-entryexhausts its 120 probes and the deploy reds.internal/clan/acmedns.go:294and:348encode the assumption that is now false: "the heartbeat writes ~90s after boot, so this typically releases in under two minutes." The heartbeat writes at t≈0, not t≈90s, and never again.Why #915 did not catch this
Commit
6fc7fba1("gate the acme-challenge point on the fulldomain fact") addedChallengeTimeout/ChallengePollpolling tointernal/fleetwire/challenge.go:110-155and wired a 2 min / 5 s budget atapp/helper/cmd/helper/wiring_prod.go:537-544. That source is reached ONLY throughOrchestrator.acmeChallenge→wireName(internal/founding/standup.go:963), andwireNamehas exactly one caller:RunReachability(internal/founding/standup.go:810) — the self-hosted S10 path. The rented journey never calls it.logs/founding-state.log:817-819records the skip verbatim: "paired — the community name was aimed at the server before install, so the public reachability check is skipped; the gateway deploy begins".So the #915 fix is a no-op for the journey that produced the #915 report. The compiled binary is confirmed to carry it (
strings app/.dev/helpercontainsfleetwire: gateway published no acme-dns fulldomain within %sand nofoundingtestingsymbols), and nofounding: read acme-dns challengeerror appears anywhere infounding-state.log— the gate never ran.Suspected layer
internal/heartbeat+ the gateway's acme-dns unit ordering (internal/clan/acmedns.go) — NOT the app-sideinternal/fleetwireseam #915 patched.What plugging it needs
A ruling on which of these owns the repair (this is why it is filed, not healed — ADR 0136 scopes the heartbeat to the address, so making it delegation-aware is a contract change, and the alternative is a gateway unit-ordering change):
LiveRecordReader, and add the challenge to theheartbeat.go:260short-circuit: re-point whenever the readable fulldomain is non-empty and the live_acme-challenge.<slug>CNAME does not already answer it. This is the #642 amendment's own logic ("reconcile external drift even when the address hasn't changed") extended to the second record family the heartbeat exclusively owns. Needs a red-first seam test ininternal/heartbeat/heartbeat_test.go: fact appears after the first tick → second tick re-points with it; fact matches the live CNAME → silent.idss-control-plane.serviceorderAfter=acme-dns-register.serviceon the gateway render so the first tick cannot lose the race. Cheaper, but it only narrows the window — a re-registration or a broker outage still strands the delegation with no retry, so (1) is likely needed regardless.internal/clan/acmedns.go:294and:348("the heartbeat writes ~90s after boot"), and theownvpspath.go:506-508comment that promises a repair the heartbeat does not actually perform.Do not re-attempt this on the
internal/fleetwireChallengeSource — that path is unreachable from the rented journey.Evidence absent from this run
state/clan-configand the rest ofstate/— empty;logs/state-logs.logrecordsENOENT ... /test-results/standing-rented/state/logs.droplet-journal.txt; this device drive harvestsdevice-journal.txt(the executor box) andgateway-journal.txtinstead.gateway-journal.txt,gateway-units.txt,gateway-stall.txt,gateway-caddy.txt) failed withroot@170.64.155.97: Permission denied (publickey,keyboard-interactive), even thoughlogs/gateway-do-forensics.txtshows the box up andtcp/22accepting a fresh connect. So there is no direct proof of the acme-dns-register vs control-plane boot ordering on THIS droplet — the diagnosis rests on the code path plus the live DNS state, which are unambiguous about the outcome. A gateway-harvest auth failure on a red rented drive is worth its own look; without it, theacme-dns-register.serviceandacme-dns-gate.servicejournals that would timestamp the race are unrecoverable.logs/broker-journal.txt— off-mesh, harvests nothing by design (#681).drive
20260828T031915Zred atstanding:the gateway deploy failed — The gateway deploy failed. [There is no old operating system to roll back to — this server was rented fresh for the community, so nothing of yours was overwritten.]evidence:
/home/swarm/swarm/Matou/idss/test-results/drive-device/20260828T031915Zon matou-workstation (legs.json and whatever else the drive harvested there) — a representative screenshot is attached here if one was captured_acme-challengedelegation never written — TLS door dead #922Closing as a duplicate of #922, in #922's favour (ADR 0174 — veto anytime). Same drive
20260828T031915Z, same fault; the signatures differ only becausestandingwrapsactivation(25304f657c24vs4c82deb1e678). #922 was already claimed (agent-working), so it keeps the work — and this ticket's sharper finding (the delegation is written once at control-plane boot and never retried, so #915's point-side gate is a no-op on this path) has been carried across in full as a comment there rather than lost.