A hostname's CNAME is stored once for every record type asked for, eight copies in all #220

Closed
opened 2026-10-02 07:35:28 +02:00 by clawbot · 1 comment
Collaborator

Found in the trial run for #149.

Each nameserver of a watched name is asked for eight record types (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS). For a name with a CNAME, the nameserver answers every one of those queries with the CNAME, and the CNAME from every answer is added to the stored records. So the same CNAME is stored eight times at each nameserver. In the run, git.eeqj.de, en.wikipedia.org, www.microsoft.com, www.github.com and www.bbc.co.uk each showed the same CNAME eight times per nameserver on the dashboard, in /api/v1/status and in state.json. A Record Change or Inconsistency notification for such a name would print it eight times as well.

To see it, watch git.eeqj.de and read its rows on the dashboard. The records are collected by collectAnswerRecords in internal/resolver/iterative.go, which appends every answer record of every query.

When this is fixed, a state file saved before the fix still holds the eight copies. Compared with the new single value, that looks like a record change.

Definition of done

  • Each value is stored once per record type per nameserver: git.eeqj.de shows one CNAME: fsn1app1.datavi.be. at each nameserver.
  • The first check after upgrading from a state file holding repeated values sends no Record Change or Inconsistency notification for them.
  • Tested against live DNS (a name with a CNAME) or on answers built in the test; no stand-in resolver.

Model: opus-5-5

Found in the trial run for https://git.eeqj.de/sneak/dnswatcher/issues/149. Each nameserver of a watched name is asked for eight record types (A, AAAA, CNAME, MX, TXT, SRV, CAA, NS). For a name with a CNAME, the nameserver answers every one of those queries with the CNAME, and the CNAME from every answer is added to the stored records. So the same CNAME is stored eight times at each nameserver. In the run, `git.eeqj.de`, `en.wikipedia.org`, `www.microsoft.com`, `www.github.com` and `www.bbc.co.uk` each showed the same CNAME eight times per nameserver on the dashboard, in `/api/v1/status` and in `state.json`. A Record Change or Inconsistency notification for such a name would print it eight times as well. To see it, watch `git.eeqj.de` and read its rows on the dashboard. The records are collected by `collectAnswerRecords` in `internal/resolver/iterative.go`, which appends every answer record of every query. When this is fixed, a state file saved before the fix still holds the eight copies. Compared with the new single value, that looks like a record change. ## Definition of done - Each value is stored once per record type per nameserver: `git.eeqj.de` shows one `CNAME: fsn1app1.datavi.be.` at each nameserver. - The first check after upgrading from a state file holding repeated values sends no Record Change or Inconsistency notification for them. - Tested against live DNS (a name with a CNAME) or on answers built in the test; no stand-in resolver. Model: opus-5-5
clawbot added this to the 1.0 milestone 2026-10-02 07:35:28 +02:00
Author
Collaborator

#236 stores each record value once per record type at each nameserver, so git.eeqj.de shows its CNAME once; a state file holding repeated values loads each value once, so upgrading sends no notification for them.

Model: opus-5-5

https://git.eeqj.de/sneak/dnswatcher/pulls/236 stores each record value once per record type at each nameserver, so `git.eeqj.de` shows its CNAME once; a state file holding repeated values loads each value once, so upgrading sends no notification for them. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#220