peteeckel/netbox-plugin-dns

Unable to add TXT record when TTL is different for the name in a zone

Closed this issue · 2 comments

Versions
NetBox Version: 3.7.8
NetBox DNS Version: 0.22.9
Python Version: 3.10

Describe the bug
I have multiple TXT records for the same name on Cludflare and they have different TTL values. This is because when Cloudflare proxy is enabled the TTL value is 1 and when it is off, we can set our value. This is however not possible to document using the plugin.

To Reproduce

  1. Create a Zone named onemindservices.com
  2. Create a TXT record with the values: name=@, value=proxy-value, ttl=1
  3. Create a TXT record with the values: name=@, value=proxy-value, ttl=86400

Expected result
The TXT record should be added successfully.

Actual result
There is at least one active TXT record for name @ in zone onemindservices.com and TTL is different (1).

Screenshots
image

Code Examples
NA

Hi @abhi1693, this is not a bug, it's a feature :)

See #205 for an explanantion of the issue. According to RFC2181, Section 5.2, the use of inconsistent TTLs within record sets is deprecated, and NetBox DNS by default enforces unique TTLs across RRsets.

There is, however, a configuration variable enforce_unique_rrset_ttl, which, when set to False, disables this enforcement.

It's also documented here