Skip to content

enhance ReplaceRRSet to track owner UID and generation for accurate record set management - #110

Merged
fr6nco merged 1 commit into
mainfrom
fix/dnsrecordset-generation-reuse-fix
Aug 26, 2026
Merged

enhance ReplaceRRSet to track owner UID and generation for accurate record set management#110
fr6nco merged 1 commit into
mainfrom
fix/dnsrecordset-generation-reuse-fix

Conversation

@fr6nco

@fr6nco fr6nco commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix stale PowerDNS RRSet reuse when a Kubernetes DNSRecordSet is deleted and recreated with the same generation.

Previously, the PowerDNS sync logic only checked the stored OBSERVED_GENERATION comment and ignored object identity. If a record was deleted and recreated immediately, the new object could have the same generation as the old one but a different UID, and PowerDNS would incorrectly treat the RRSet as already current.

This patch stores the Kubernetes object UID in PDNS comments and treats an RRSet as current only when both generation and UID match. Legacy records that only have generation metadata are treated as stale and reconciled on the next pass.

Impact

  • prevents stale RRSet reuse after delete/recreate cycles
  • supports migration for existing records created before UID tracking existed
  • preserves correct cleanup/delete behavior for stale and deleted objects

Contiation of #82

@fr6nco
fr6nco marked this pull request as draft August 26, 2026 12:39
@fr6nco
fr6nco requested a review from 0xmc August 26, 2026 12:55
@fr6nco
fr6nco marked this pull request as ready for review August 26, 2026 12:55
@fr6nco
fr6nco requested review from drewr and scotwells August 26, 2026 13:02
@fr6nco
fr6nco merged commit 2d19404 into main Aug 26, 2026
10 checks passed
@fr6nco
fr6nco deleted the fix/dnsrecordset-generation-reuse-fix branch August 26, 2026 13:08
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.

2 participants