Hello,
This feature request is off the back of this post.
Currently, MAAS is not able to effectively act as a DHCP server for BMC interfaces. Currently, we either have to configure BMC IPs manually (this stops scaling very quickly) or we have to maintain a separate DHCP server for the BMCs (not the end of the world but it would be great if we can handle this within MAAS entirely)
When a machine is added to MAAS, we have the option to configure a power type. Let’s take as an example the IPMI power type. In the UI, we have the ability to provide the username and password for the BMC and, of course., its IP (which MAAS will use to communicate with the BMC). In the same window, MAAS also allows us to fill in the BMC MAC, but as far as I can tell, MAAS does not do anything with that MAC.
If the BMC MAC is left empty during the creation of the machine, MAAS will populate the BMC MAC after it commissions the machine. Even then, though, MAAS doesn’t seem to do anything with the MAC other than record it.
Even if the BMC IP falls in a subnet that is part of a VLAN that has been configured for DHCP in MAAS, MAAS will not add a DHCP reservation for the BMC MAC into that VLAN. In fact, MAAS will act as a DHCP server for the VLAN (the machine’s BMC will receive an IP from the MAAS DHCP server) but the IP will be from within the VLANs “Reserved Dynamic Range”. This is not useful as the IP that the BMC receives from the DHCP server needs to be the same as the IP configured in the machine’s Power Type configuration section.
Reposting here the scenario from the original post, which was tried on MAAS 3.2.6 and MAAS 3.3.0. For more details on the scenario and answers to follow up questions, please see the original post. Happy to also answer questions here.
Our workflow is as follows:
- We have a fabric, let’s call it fabric0
- We have a tagged VLAN 20 within this fabric, call it “bmc-vlan”
- We have a single subnet within this vlan, call it “bmc-subnet”
- We have configured our MAAS rackd with a second interface and assigned it an IP on the “bmc-subnet”. Within the Ubuntu OS, this interface appears untagged. But the interface itself is connected to VLAN 20 on our switch.
- We enable DHCP on the “bmc-vlan” within MAAS and assigned it to the rackd from step 4
- 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 we look at the “bmc-subnet” in MAAS, we see that the IP address of the BMC of test-machine shows up under “used IP address” of the subnet with a type of “Sticky”.
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.If I true to use the “devices” option in MAAS to create a “device” for the BMC of test-machine, I get an error that the IP already exists.
Thanks for your consideration of this feature request!