Skip to content

fix: support AAAA records properly - #98

Open
mojansch wants to merge 4 commits into
inovex:mainfrom
scaleup-technologies:fix/aaaa-recordset-support
Open

fix: support AAAA records properly#98
mojansch wants to merge 4 commits into
inovex:mainfrom
scaleup-technologies:fix/aaaa-recordset-support

Conversation

@mojansch

Copy link
Copy Markdown

Currently, the webhook creates AAAA records but doesn't return them, resulting in an error loop.
This fixes that and adds a test in the devstack action.

mojansch added 2 commits July 29, 2026 14:49
Records() only ever returned A, TXT and CNAME recordsets from Designate.
Any existing AAAA recordset was invisible to external-dns's planner, so
it treated it as permanently missing and retried CreateRecordSet every
sync interval, failing forever with 409 duplicate_recordset once the
record already existed.

Also adds a devstack integration check that seeds an AAAA recordset
directly in Designate and asserts the webhook's GET /records reports it
back. The existing checks only ever exercise A/TXT since external-dns's
fake source never emits AAAA, so they wouldn't have caught this bug.
external-dns's endpoint.NewEndpointWithTTL trims the trailing dot from
DNSName, so the /records response has "aaaa-webhook-test.example.com"
without a trailing dot, not "aaaa-webhook-test.example.com.". The AAAA
fix itself was correct - confirmed by the actual CI run, which showed
the record present in the response before this assertion rejected it.
Comment thread .github/workflows/devstack.yml Outdated
Comment thread internal/designate/provider/provider.go Outdated
@mojansch
mojansch requested a review from Knalltuete5000 August 6, 2026 12:46

@frittentheke frittentheke left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a ton for your time and contribution.
Adding AAAA support is long time due!

Comment on lines +111 to +116
# external-dns's `fake` source only ever produces A records, so the checks above never
# exercise AAAA handling. Regression test for a bug where the webhook's Records() call
# silently dropped AAAA recordsets, so external-dns would never see an AAAA record as
# already existing and would loop forever trying (and failing) to recreate it. Designate
# itself already had the record correctly, so `openstack recordset list` alone can't catch
# this - the bug is specifically in what the webhook reports back over its own API.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for not just not testing things, but for thinking outside the box to work around external-dns in this case. But actually the Fake source does support other record types, see kubernetes-sigs/external-dns#6308.

I know this has not made it into a release, but 0.22 is indeed planned: kubernetes-sigs/external-dns#6607

Records: []string{"10.1.1.2"},
})
rs15ID, _ := client.CreateRecordSet(ctx, zone1ID, recordsets.CreateOpts{
Name: "www6.example.com.",

@frittentheke frittentheke Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know we are not yet following this yet, but I'd like to use the test. TLD as per RFC 6761.
See my PR about changing the other occurrences: #74

Edit: I know the Fake source of external-dns does only create "example.com" records though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants