Skip to content

CLOUDNS (DS Provider) will try to update NS record to the original one without honor vanity NS #4023

@Zenuncl

Description

@Zenuncl

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:

  1. 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

  2. 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:

  1. Create a new Zone on CloudNS website, and select vanity NS (not default one)
  2. 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)
};
  1. Try to run dnscontrol preview
  2. 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 NAMESERVER record 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions