Comment 3 for bug 1786799

Revision history for this message
Niels van Adrichem (nvanadrichem) wrote : Re: Default DNS IP for node from interface without gateway

Hi Andres,

Thank you for looking into this.

I put a snippet of the interface configuration in the attachment as an example. We have 2 bonds, both of which have access networks (VLANs 1010 and 1011) which are not routable, 1 of them has a VLAN with a routable network (VLAN 1122) which we'd like to have the domain name set to, PXE occurs over a separate non-bonded interface which we do not configure for the final installation.

Currently, MAAS sets the primary hostname to either VLAN 1010 or 1011 shown in the attachment, while those are not routable. The routable network on VLAN 1122 gets the hostname bond0.1122.<hostname>.<domainname> instead of <hostname>.<domainname>. A quick patch was to update the boot-interface in the database directly through an SQL-query, though rebooting a machine moved the setting back to the unconfigured eno0 interface due to the PXE attempt at boot time.

For now we solved it in our system with the patch attached to the bug description, though I think in general it may be considered better to set the hostname to what the interface with the primary gateway is (I noticed there is also a primary gateway interface selection occuring in the function get_best_guess_for_default_gateways() in src/maasserver/models/node.py). As a future follow-up on this, a valid feature request could be to maybe make the primary interface for DNS configurable through CLI and web gui (as also our use case is but yet another use-case that may not cover all other use cases).