-
Notifications
You must be signed in to change notification settings - Fork 486
Description
NOTE: Have a general question? You'll get a better response on the dnscontrol-discuss email list!
Describe the bug
The DSP CLOUDNS provider will try to CREATE NS record to the default cloudns.net / cloudns.com NS, even in setting it used other white label vanity NS
******************** Domain: mydomain.com
4 corrections (cloudns)
#1: + CREATE NS mydomain.com pns1.cloudns.net. ttl=300
#2: + CREATE NS mydomain.com pns2.cloudns.com. ttl=300
#3: + CREATE NS mydomain.com pns3.cloudns.net. ttl=300
#4: + CREATE NS mydomain.com pns4.cloudns.uk. ttl=300
- When I created a new zone, I select a pre-set vanity NS record, for example ns1.mydomain.com
- Default zone file only include selected NS records, like ns1.mydomain.com, ns2.mydomain.com
Then there will be TWO scenario:
-
If the dnscontrol config has NS records set to match whatever you have on CloudNS
It will try to create 4 New records as output showed above -
Write a simple DNS config file as following
It will also try to create 4 New records as output showed above
To Reproduce
Steps to reproduce the behavior:
- Create a new Zone on CloudNS website, and select vanity NS (not default one)
- Write a DNS config file as following
var REG_NONE = NewRegistrar("none");
var DSP_CL = NewDnsProvider("cloudns");
D("mydomain.net", REG_NONE,
DnsProvider(DSP_CL),
DefaultTTL(3600),
NAMESERVER("ns1.mydns.com")
NAMESERVER("ns2.mydns.net")
A(".....")
(rest of other records, A, TXT etc)
};
- Try to run dnscontrol preview
- See error (Likely it will always create new NS record unless your NS records is using their default one)
Expected behavior
- Won't update if it's same
- Won't update if I don't have
NAMESERVERrecord set (so keep the same)
DNS Provider
- CLOUDNS
Additional context
dnscontrol version: v4.30.0
go version: 1.25.1
OS version: Debian 12
From reading the code, I beleive here and the api code are where it try to fetch "available nameserver" and then appened to the config file without consider user's input.