GithubHelp home page GithubHelp logo

Comments (4)

tlimoncelli avatar tlimoncelli commented on August 23, 2024 1

Well, let's consider all the possibilities.

  • A registrar can be "something" (like ROUTE53, etc) or "none" (the "NONE" provider, meaning "don't update the registrar".
  • A DnsProvider can be nil (none specified), "something" (like NAMEDOTCOM or BIND), or "none" (the "NONE" provider, meaning we intentionally don't want to update the zone's records)

That gives us 6 combinations:

R:something D:none
No warning needed. This is a normal "delegated domain" where we control the registrar, but someone else is controlling the zone.

R:none D:none
No warning needed. This is an "inventory only" domain. It is listed in dnsconfig.js just so that "dnscontrol print-ir" lists it. This is done if you keep an inventory of domains that (for example) the company owns but other divisions manage.

R:none D:something
No warning needed. This is a normal "third-party registrar." We control the zone records but someone else is controlling the registrar.

R:something D:something
No warning needed. This is a normal domain. We control the registrar and the zone's records

R:something D:nil
This is the situation that @devblackops had. Because there was no DnsProvider(), no zone records were being updated. It is a legal combination, but it is confusing. Thus, it deserves a warning.
Print: Warning: No DnsProvider() in domain example.com.

R:none D:nil
This combination doesn't make sense. Use the "inventory only" combination instead.
Print: Warning: No DnsProvider() in domain example.com.

The only combinations that don't make sense are the last two. Both should get warnings. To turn off the warnings, add DnsProvider("NONE").

We can be "smart" by only displaying the warning if there are zone records.

To resolve this bug, we should print the warning if len(DomainConfig.DNSProviderNames) == 0 && len(DomainConfig.Records) != 0

from dnscontrol.

lolifamily avatar lolifamily commented on August 23, 2024

interesting, how to add glue records?

from dnscontrol.

cafferata avatar cafferata commented on August 23, 2024

@tlimoncelli thanks for this clear explanation. 👏🏻

Certainly interesting! Because I have never thought about the situation R:none D:none (Include domain names in DNSControl for an overview.) before.

from dnscontrol.

tlimoncelli avatar tlimoncelli commented on August 23, 2024

Yeah, the R:none D:none is something I recently "invented".

Our legal department periodically asks for a list of all the domains we own. I generally give them the output of dnscontrol print-ir | jq -r '.domains[].name' but then I always have to remember to manually add a couple more domains that aren't maintained by DNSControl.

I know what you're thinking: Tom, there are domains you don't maintain with DNSControl? How dare you???

Yeah, crazy huh? Well, it happens. For example, I can't maintain dnscontrol-azure.com using DNSControl because it is used in our integration tests. It has to be isolated from everything else or our CI/CD pipeline would clobber our production DNSControl pipeline.

Anyway...

A few months ago I realized I could define this macro:

var REG_THIRDPARTY = NewRegistrar("none");

function INVENTORY_ONLY(name) {
    D(name, REG_THIRDPARTY, NO_NS);
}

Now we can list those domains are listed in dnsconfig.js as:

INVENTORY_ONLY("dnscontrol-azure.com");
INVENTORY_ONLY("example.com");
INVENTORY_ONLY("example2.com");

Now when I run dnscontrol print-ir | jq -r '.domains[].name' I get the list I want.

from dnscontrol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.