According to [1] "All machine communication with MAAS is proxied through rack controllers, including... DNS" however this does not appear to be the case. Some example scenarios:
In all scenarios, if DNS servers are specified as part of the subnet those servers override the MAAS provided servers.
Scenario 1:
Region controller in subnet A, 2 rack controllers in subnet B, machine deployed in subnet B. If no DNS servers are specified NOT in the subnet MAAS provides the 2 rack controllers and the region controller as DNS servers.
Scenario 2:
Region controller in subnet A, 2 rack controllers in subnet B, MAAS configured to relay DHCP for subnet C to rack controllers in subnet B, machine deployed in subnet C. MAAS provides the region controller as the DNS server.
I suspect if I had multiple region controllers MAAS would provide each of them as DNS servers in these scenarios. Based on the documentation I would not expect the region controller to be included in the list of provided DNS servers. In fact, in some environments communication is limited to the region controllers and DNS may not be reachable. In the scenario of relayed DHCP this is tricky but solely based on the docs I would expect MAAS to configure the DNS servers as the rack controller(s) in subnet B.
[1] https://maas.io/docs/maas-communcation
I ran a test env that consists of two subnets, 192.168.200.0/24 and 192.168.122.0/24, with regiond being 192.168.122.209 and rackd 192.168.200.1, installed in different machines.
I noticed that depending on the IP assignment method, static or dynamic, the DNS server list changes in the deployed machines:
- dhcpd.conf looks like this for both nodes:
ubuntu@ maas-region: ~$ sudo cat /var/lib/ maas/dhcpd. conf | grep name-s
option domain-name-servers 192.168.122.209;
ubuntu@ maas-rackd: /var/log/ maas$ sudo grep name-server /var/lib/ maas/dhcpd. conf
option domain-name-servers 192.168.200.1, 192.168.122.209;
Note that for some reason, the region IP appears as a DNS server in the rack DHCP config.
- If I deploy a machine with a static IP in the rack subnet the preseed is built wrong, as it replaces the rack DNS entry with the region IP. From the curtin cfg:
- 192.168.122.209
The issue seems to come from get_maas_ facing_ server_ host() (@src/maasserve r/server_ address. py), because it returns the IP from rack_controller .url, which points to the region IP, instead of the IP from the rack.
- The difference in the lists seems to come from the fact that dhcp.py extends the server list using get_dns_ server_ addresses_ for_rack( ), which effectively retrieves the rack IPs and adds them to the list.