Commit 3e68262
authored
DNS servers should have NS and SOA records (#8047)
this is probably the more _exciting_ part of the issues outlined in
#6944. the changes here get us to the point that for both internal and
external DNS, we have:
* A/AAAA records for the DNS servers in the internal/external group
(named `ns1.<zone>`, `ns2.<zone>`, ...)
* NS records for those servers at the zone apex, one for each of the
`ns*.<zone>` described above
* an SOA record synthesized on-demand for the zone apex for each of
`oxide.internal` (for internal DNS) and `$delegated_domain` (for
external DNS)
* the SOA's serial is updated whenever the zone is changed. serial
numbers are effectively the DNS config generation, so they start from 1
and tick upward with each change. this is different from most SOA serial
schemes (in particular the ones that would use YYYYMMDDNN numbering
schemes) but so far as i can tell this is consistent with RFC 1035
requirements.
we do _not_ support zone transfers here. i believe the SOA record here
would be reasonable to guide zone transfers if we did, but obviously
that's not something i've tested.
### SOA fields
the SOA record's `RNAME` is hardcoded to `admin@<zone_name>`. this is
out of expediency to provide *something*, but it's probably wrong most
of the time. there's no way to get an MX record installed for
`<zone_name>` in the rack's external DNS servers, so barring DNS hijinks
in the deployed environment, this will be a dead address. problems here
are:
* we would want to take in an administrative email at rack setup time,
so that would be minor plumbing
* more importantly, what to backfill this with for deployed systems?
it seems like the best answer here is to allow configuration of the
rack's delegated domain and zone after initial setup, and being able to
update an administrative email would fit in pretty naturally there. but
we don't have that right now, so `admin@` it is. configuration of
external DNS is probably more important in the context of zone transfers
and permitting a list of remote addresses to whom we're willing to
permit zone transfers. so it feels like this is in the API's future at
some point.
## bonus
one minorly interesting observation along the way is that external DNS
servers in particular are reachable at a few addresses - whichever
public address they get in the rack's internal address range, and
whichever address they get in the external address range. the public
address is what's used for A/AAAA records. so, if you're looking around
from inside a DNS zone you can get odd-looking answers like:
```
# 172.30.1.5 is the internal address that an external DNS server is bound to.
# oxide.test is the delegated domain for this local Omicron deployment.
root@oxz_external_dns_68c5e255:~# dig +short ns2.oxide.test @172.30.1.5
192.168.0.161
root@oxz_external_dns_68c5e255:~# dig +short soa oxide.test @172.30.1.5
ns1.oxide.test. admin.oxide.test. 2 3600 600 18000 150
root@oxz_external_dns_68c5e255:~# dig +short ns oxide.test @172.30.1.5
ns1.oxide.test.
ns2.oxide.test.
# 192.168.0.160 is an external address for this same server.
# there are no records referencing 172.30.1.5 here.
root@oxz_external_dns_68c5e255:~# dig +short ns oxide.test @192.168.0.160
ns1.oxide.test.
ns2.oxide.test.
root@oxz_external_dns_68c5e255:~# dig +short ns1.oxide.test @192.168.0.160
192.168.0.160
```1 parent 7547bfa commit 3e68262
File tree
48 files changed
+6798
-1290
lines changed- clients/dns-service-client/src
- common/src/api/external
- dev-tools
- omdb
- src/bin/omdb
- tests
- reconfigurator-cli
- src
- tests
- input
- output
- dns-server-api/src
- dns-server
- src
- bin
- tests
- internal-dns
- resolver/src
- types/src
- v1
- v2
- nexus
- db-model/src
- db-queries/src/db/datastore
- reconfigurator
- execution/src
- planning/src
- blueprint_builder
- simulation/src
- src/app
- background/tasks
- test-utils/src
- types/src
- deployment/execution
- openapi
- dns-server
- sled-agent/src/rack_setup/plan
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+6798
-1290
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
748 | 748 | | |
749 | 749 | | |
750 | 750 | | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
751 | 755 | | |
752 | 756 | | |
753 | 757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6645 | 6645 | | |
6646 | 6646 | | |
6647 | 6647 | | |
6648 | | - | |
| 6648 | + | |
6649 | 6649 | | |
6650 | 6650 | | |
6651 | 6651 | | |
| |||
6670 | 6670 | | |
6671 | 6671 | | |
6672 | 6672 | | |
| 6673 | + | |
6673 | 6674 | | |
6674 | 6675 | | |
6675 | 6676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| 444 | + | |
| 445 | + | |
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
| |||
1123 | 1125 | | |
1124 | 1126 | | |
1125 | 1127 | | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
1126 | 1135 | | |
1127 | 1136 | | |
1128 | 1137 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 0 additions & 12 deletions
This file was deleted.
0 commit comments