-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNSControl treats a configured TTL of 0 as "not configured" #2444
Comments
This is probably actually just by accident. I think the core issue here is that 0 in the TTL field is being treated as "falsey" in Fixing this would require changing both the JavaScript and Go types to separately represent |
These are all the spots in the Go code that map Lines 377 to 379 in 5b3bb31
dnscontrol/pkg/normalize/validate.go Lines 352 to 354 in 5b3bb31
dnscontrol/pkg/prettyzone/prettyzone.go Lines 88 to 90 in 5b3bb31
dnscontrol/pkg/prettyzone/prettyzone.go Lines 103 to 105 in 5b3bb31
Commenting out the first two is sufficient to invert the meaining of |
So, there are a few directions this could go:
|
Another useful UX thing before, or in addition to, the above: change the way colour highlighting works, to only highlight the changed parts instead of the whole |
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
I implemented "Remove the non-zero restriction on TTL" in #2475, which AFAICT (as a non-Go developer) was the simplest approach. |
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
This unifies the logic for handling the dnscontrol-default TTL, and frees up the TTL value 0 for use by providers (e.g. Linode, which uses it as its sentinel for its default TTL). Closes StackExchange#2444.
While discussing the fact that Linode's API explicitly permits and returns a TTL of 0 to represent "Default", I asked in #2440 (comment):
It turns out that DNSControl completely ignores any
DefaultTTL(0)
orTTL(0)
settings, causing it to instead fall back on the global DNSControl default of 300 seconds. AFAICT the code inpkg/js/helpers.js
handles things correctly, but when the JSON is parsed into Go, the resultingRecordConfig
has its TTL replaced by the hard-coded global default of 300:dnscontrol/models/record.go
Lines 377 to 379 in 5b3bb31
This prevents the
LINODE
provider (or any other provider) from setting or preserving a TTL of 0 (as was theoretically enabled by #2442).The text was updated successfully, but these errors were encountered: