Hey @rockpapergoat, thanks for your message.
if you have the bmc set to get a dhcp address, and maas is configured to hand out leases on that subnet/vlan, it will work, right — the bmc gets an address?
No, unfortunately this doesn’t work. This section of the original post covers the behavior:
We create a machine, call it “test-machine”, and configure the “power” option to the IPMI interface. We define the IP address, which is within the range of bmc-subnet, a BMC MAC.
When the BMC is connected to the network, it receives an IP from the MAAS “Reserved Dynamic Range” range of bmc-subnet and not the IP that was defined under the “power” options of test-machine.
When I look at /var/snap/maas/common/maas/dhcpd.conf on the rackd server from step 4, I do see the bmc-subnet defined. I do not see, however, a “host” (DHCP reservation) defined for the MAC address of the BMC of test-machine. I do see “host” entries for the non-BMC interfaces of other hosts.
So even though MAAS will act as a DHCP server for the VLAN/Subnet where BMCs are connected to, without the DHCP reservations for each IP/MAC combo, there is no way to guarantee that the Machine’s BMC will receive the IP address that was configured in its Power Type section. And, therefore, MAAS cannot power control the machine.
but then the issue is that maas expects to know both the ip and mac of the bmc for power control. if maas could instead look up the mac or use a name instead of ip, even if the name is autogenerated, would that solve the problem?
Apologies but I do not follow this fully. MAAS does know both the IP and the MAC of the BMC as we configure both of those as part of the IPMI “Power Type” section. The issue seems to be that MAAS does not create DHCP reservations for BMCs in the same way that it does for Network Interfaces that have a “static” IP assigned to them.
In the case of network interfaces with static IPs, MAAS creates a DHCP reservation in its DHCP server for the MAC/IP combo of the network interface. So when the host PXE boots from that interface, it does so with the static IP assigned in MAAS (and delivered to the host’s interface via DHCP). Of course, when the OS is later installed the interface is configured with a static IP, but the DHCP reservation still remains on the MAAS DHCP server.
MAAS does not seem to be doing the same for BMC IP/MAC combos configured under the “Power Type” section of a host.
If the feature doesn’t exist today, that’s totally fine. I am mainly trying to understand if there is a way for MAAS to act as a DHCP server, with DHCP reservations, for the BMC interfaces. Based on what @billwear is saying, that is not possible (we’d rather not follow unsupported scenarios as this is for a production environment) .
That said, I think this would be an amazing feature to add to MAAS. That way, we don’t have to either manually assign IP addresses to BMCs (in general, this doesn’t scale well) or maintain a separate DHCP server just for the BMC VLAN.