d2iq-archive / mesos-dns

DNS-based service discovery for Mesos.
https://mesosphere.github.com/mesos-dns
Apache License 2.0
483 stars 137 forks source link

records: use SOA mname instead of rname #502

Closed jdef closed 7 years ago

jdef commented 7 years ago

fixes #501

jdef commented 7 years ago

@gpaul I did a small bit of refactoring in a separate commit from the unit test I added. The refactoring helped to keep the test small, and more cleanly separates state loading from record generation (as it should be). When this PR lands, I'd like to keep the commit history vs. squashing it.

jdef commented 7 years ago

There's another, related issue that we could solve as part of this ticket: if the SOA mname isn't part of the mesos-dns domain, then mesos-dns SHALL NOT report an A RR. We don't perform any checks for this (https://github.com/mesosphere/mesos-dns/blob/9d21ea6de38bd371e34bde196ceaee94cdac8a2c/records/generator.go#L478).

See the examples here: http://www.zytrax.com/books/dns/ch8/soa.html

We should either: (a) validate that the SOA mname is within the mesos-dns domain, or else; (b) NOT generate A RR's for an mname that is outside the scope of the mesos-dns domain

Should I write up a separate ticket for this, or just fix as part of this one? @gpaul

jdef commented 7 years ago

answered my own question re: the above: opened issue #504 to track additional SOA mname rules