It would be nice to be able to specify hostnames instead of IP addresses for the bmc_address in power parameters for a machine.
At some organizations, it’s standard operating procedure to create DNS entries for machine BMC addresses and this can make managing machines within MAAS a little more convenient.
As I understand it, determining which controller can talk to a particular machine is done once when you add a machine. For this to work, that determination would either need to be done every time MAAS communicates with the BMC (since the IP could change) or re-evaluate the controlling controller periodically. Perhaps this could be tuned to check whenever the DNS record TTL expires and do the ipmi-ping only when the resolving IP changes. Of course that means we’d have to keep track of the IP associated with the DNS name.
It might also make sense to resolve CNAMES in case the hostname is just a convenience name that points to a standard hostname such as a hostname that represents the serial number or asset tag.
In situations where the dns resolves to multiple IPs (which does seem unlikely) we could just use the first that works but since dns records are returned in basically a random order, this could change with every lookup. Perhaps we would have to sort the results?