rented gateway gets no DNS-01 delegation: the challenge fact is read one second after it is written, reads empty, and nothing ever re-points #915
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.
Blocks
Reference
Matou/idss#915
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?
The failure
A rented gateway deploys, both TLS doors never answer, and
activationreds after 648 s (#905, drive20260827T144343Z, 15 green / 2 red). The zone shows why — for slugrehearsal-c, checked live against the authoritative nameserver:rehearsal-c.idss.nz168.144.172.20*.rehearsal-crehearsal-c.idss.nz._acme-challenge.rehearsal-crehearsal-c.idss.nz.acme.rehearsal-cDNS-01 can never validate, so Caddy waits on
:443forever and neither door comes up.The gateway is NOT at fault — it held a valid fulldomain the whole time
/var/lib/idss-acmedns/on the live gateway (168.144.172.20), all written 14:58:acme-dns-registersucceeded. (The lonecurl: (7) … 127.0.0.1:8081in its journal at 14:58:35 is the health poll's first iteration, retried green a second later —#431's 300 s readiness gate working as designed. It is not a failure; do not chase it.)Root cause — a best-effort read at a moment the fact cannot yet exist, and no second chance
ChallengeSource.AcmeChallenge(internal/fleetwire/challenge.go:81) fetches the fulldomain over SSH from the gateway and, by explicit design, returns honest-absent""— never an error — in three cases:sshPortfails →return "", nil("no forward yet")return "", nil("gateway unreachable")cat … 2>/dev/null || true→ empty stdout, zero exitThe point request went out at 14:58:37, one second after
acme-dns-registerfinished at 14:58:36. It read empty, and the broker duly wired the name with A + wildcard and no delegation (ADR 0100: never fabricate one).That much is correct behaviour. The gap is what happens next: nothing ever re-points. The absent delegation is permanent for the life of that name, and the function's own comment — "a missing challenge only decorates the name-wiring, so it must never abort it" — is backwards for DNS-01. Without the delegation the door can never obtain a certificate. The "decoration" is load-bearing, so an absent challenge is not a cosmetic degradation; it is a guaranteed dead door.
Fix — pick one, they are not equivalent
vm.Manager.WaitReady/pollReady; DDR 0192'sCarrierConfig.ConnectTimeout/ConnectPoll, added for#691's identical "started ≠ ready" race). The fact is written seconds after the gateway boots, so a short budget suffices.renderAcmeDNSGate's comment names "the_acme-challenge.<apex>CNAME the broker's heartbeat publishes"). Carry the challenge on the heartbeat and let the broker complete the record set late. This also self-heals a gateway that re-registers.ADR 0100) if the wiring completes with no delegation, instead of returning a name that cannot ever serve TLS. Weakest alone — it converts a silent 648 s death into a fast one — but it is the honest floor and pairs well with 1 or 2.Do not "fix" this by re-running
PutRecordsagainst the current zone: the record is wrong because its input was empty, and a redeploy with the same empty input rewrites the same wrong CNAME.Acceptance
_acme-challenge.<slug>CNAME names the gateway's own acme-dns fulldomain, andacme.<slug>carries the NS delegation, before Caddy first orders a certificate.activation.Evidence
test-results/drive-device/20260827T144343Z/onelitebook-03—artifacts/verdict.json,artifacts/legs.json,logs/founding-state.log.168.144.172.20(droplet595628182) still standing at filing time:/var/lib/idss-acmedns/{fulldomain,caddy.env,registration.json}, andjournalctl -u acme-dns-register.andy.ns.cloudflare.com. Note for anyone verifying:*.idss.nzhas a wildcard A record, so every name under the zone resolves and an A-record probe proves nothing — query the specific type (NS,CNAME) or you will misread deleted records as present (#887).Filed by the watch under ADR 0174 at Ben's direction, as the remaining half of #905 (its other half, the DigitalOcean token, is resolved — the broker now runs a credential with delete scope and has logged zero 403s since 22:34:58Z). My first diagnosis on #905 blamed a readiness race in
acme-dns-register; that was wrong and is corrected on that ticket.swarm-claim host=matou-dev-server-01 run=12993
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #915 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
sshdunit — Ubuntu 24.04 names itssh, enroll exits 1 #917ports-honest: the S10 one-shot probe beats the 443 drop, then #915's acme-dns gate faultsRunReachabilityuncommitted and freezes the screen buttonless #920_acme-challengedelegation 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_acme-challengedelegation never written — TLS door dead #922_acme-challengedelegation never written — TLS door dead #922_acme-challengedelegation 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) #921ports-honest: the S10 one-shot probe beats the 443 drop, then #915's acme-dns gate faultsRunReachabilityuncommitted and freezes the screen buttonless #920ports-honest: the S10 one-shot probe beats the 443 drop, then #915's acme-dns gate faultsRunReachabilityuncommitted and freezes the screen buttonless #920