IP Mode: DHCP as default?

Is it possible to make IP Mode: DHCP the default?

For us it would be useful in two ways:

  • For using our sitewide DHCP servers.

  • For using Intel AMT with DHCP.

Currently the best I’ve been able to figure out is something like this after commissioning, which is ugly and which I’m not yet sure how to make happen automatically when commissioning of a node is finished:

$ maas admin nodes read | jq -r --arg NODE $NODE ‘.[] | select(.hostname==$NODE) | .system_id as $node_id | .interface_set[] | .id as $interface_id | .links[] | [$node_id, $interface_id, .id] | @sh’ | awk ‘{cmd=“maas admin interface unlink-subnet “$1” “$2” id=”$3; print(cmd); system(cmd)}’

$ maas admin nodes read | jq -r --arg NODE $NODE ‘.[] | select(.hostname==$NODE) | .system_id as $node_id | .interface_set[] | select(.link_connected==true) | .id as $interface_id | [$node_id, $interface_id] | @sh’ | awk ‘{cmd=“maas admin interface link-subnet “$1” “$2” subnet= mode=dhcp”; print(cmd); system(cmd)}’

It would be nice to not have to do that for the ~500 nodes we need to transition and any future nodes we bring in, but instead to have it as a default.

To explain the problem with IP Mode: Auto Assign and a machine with Intel AMT set up to use a DHCP address shared with the machine:

  • We commission a node.
  • Since MAAS doesn’t detect Intel AMT automatically like it does with IPMI, we have to enter the IP address for power configuration into MAAS manually.
  • When the node is deployed with the default of IP Mode: Auto Assign, the IP address of both the machine and Intel AMT changes.
  • Since the Intel AMT IP address has been entered manually into MAAS, this doesn’t change when the actual IP address changes, and power control fails until we manually update the MAAS power config with the new IP address that MAAS has assigned to the machine.

I have submitted a patch for this:

Merge into master : default_boot_interface_link_type : lp:~andrew-boatrocker/maas : Git : Code : MAAS (launchpad.net)

It’s failing unit tests on the CI server, but the link to the logs to see what’s failing don’t appear to be reachable for me to see what’s wrong.