In addition to the bug described in https://bugs.launchpad.net/maas/+bug/1776604, I have a new use-case that may further complicate the SQL query that selects the primary interface for the DNS hostname.
We have a network design where PXE and initial deployment is performed through a CAT6-wired network. In the interfaces configuration, however, we do not configure this interface and instead configure a number of bonds (generally 2 or 3) existing of 10Gbe interfaces. Often, one of these bonds is exclusively used for storage access and is hence an access-port without tagged VLANs attached, an IP address that is not publicly routable and no gateway configured. Another bond (not a child of the xe/boot interface) contains a tagged VLAN with publicly routable IP address and a gateway configured for management and public access purposes.
In the current ordering of the query in function get_hostname_ip_mapping() of src/maasserver/models/staticipaddress.py, however, the bond interface without publicly routable address nor gateway gets preference over the VLAN interface on top of a bond with publicly routable address and gateway.
Our problem can be solved by adding another variable to the ordering statement of the SQL query, prefering interfaces with gateways configured over interfaces without gateways configured. Please comment on attached file what you think about this, all tests still seem to run. Ultimately, however, it might be better to make the primary interface for DNS resolution configurable.
Hi Niels,
So if I understand correctly, you have 2 bonds:
1. With no routable address, where PXE boot happens
2. Publicly routable address, not where PXE happens.
MAAS correctly sets the hostname based DNS to (1) - (as this is where the machine PXE's from), but you want this set to (2) ?
Additionally, I'm wondering which interface is the default gateway interface? Is this (2)? e.g.
maas <user> interface set-default-gateway <system-id> <interface> ? If it is not, what if you change it that way? will that interface get the hostname based DNS name?