Associating hostname with a specific interface in MAAS

I have multiple physical network interfaces on each node. I use one of them for PXE booting and the others are grouped together in bonds with two physical interfaces each. When I deploy a node, the hostname is automatically associated with the PXE interface, which is also used for discovery. Is it possible to configure MAAS to associate the hostname with a different interface, such as a bond interface (e.g. bond0) or a VLAN on a bond interface, instead of the PXE interface?


Not by default. What if you change the DNS records after the deployment? Would this solution work for you?

It is impossible to change DNS resource records (RR) derived from the “Machine” and “Device” objects from the “Networking - DNS - {Domain} - Resource records” page.

You are right @maasuser1 , thank you for double checking this! Then nope, this is not supported. MAAS will create records like “$hostname.$iface.$domain” for all the other interfaces, but it will use $hostname.$domain only for the boot interface.

I wonder if you could create a record by yourself pointing to the IP address you want according to a have a naming convention you decide? Something like my-$hostname.$domain?

What is your use case, if I may ask?

The bonded interface is manually created. By the time of commissioning, the bonding relations did not exist yet. Apart from this, you cannot change interface settings for a deployed machine:

Interface configuration cannot be modified unless the machine is New, Ready, Allocated or Broken.

As a result of this, to get a $iface.$hostname.$domain hostname, you need to enable hardware sync, or manually create a DNS RR using MAAS API.

so the only right way for leave it automated, is changing the primary interface with the primary interface of bond (thanking care about the mac address) and allow this interface to pxe boot right?

maas $user machine update $mid interface=ens18.74 primary=true
maas $user machine update $mid interface=ens19.74 primary=true
maas $user machine update $mid interface=ens19.74 primary=true
maas $user machine update $mid interface=ens19.74 parent=1
maas $user machine update $mid interface=ens19.74 parent=0

setting primary or parent doesent help nothing!?

I think UEFI doesn’t have a notion of NIC bonding/LACP. I am afraid there is no out-of-box solution for PXE over the bonding interface.

You can create a Kea/RouterOS/VyOS instance to handle the DHCP, and collaborate with MAAS using Restful API.

1 Like

This suggestion is not suittable in my case… but thanks