DHCPd forgets about IPMI IP addresses (MAAS 3.4) - IPMI power error

I’m in the process of setting up maas for a small deployment (about 200 servers) and the DHCPd server keeps on assigning a given MAC address to multiple different IP addresses (no problem with that) but also forgets about it. The net result is an IPMI power error as maas is no longer able to talk to the BMC of the nodes.

Initially the BMC gets the IP number 192.168.29.237. Here’s the dhcpd.leases log:

lease 192.168.29.237 {
  starts 2 2023/11/07 18:44:44;
  ends 2 2023/11/07 18:46:44;
  tstp 2 2023/11/07 18:44:20;
  tsfp 2 2023/11/07 18:49:20;
  atsfp 2 2023/11/07 18:49:20;
  cltt 2 2023/11/07 18:44:44;
  binding state free;
  hardware ethernet ac:1f:6b:b6:a4:a4;
  set vendor-class-identifier = "udhcp 1.23.1";
  client-hostname "disk-27.ipmi.canada.boson.ai";
  on expiry {
    set clhw = 
       binary-to-ascii (16, 8, ":", 
                        substring (hardware, 1, 6)) ;
    set clip = 
       binary-to-ascii (10, 8, ".", leased-address) ;
    execute ("/usr/sbin/maas-dhcp-helper", "notify", "--action", "expiry", 
        "--mac", clhw, "--ip-family", "ipv4", "--ip", clip, "--socket", "/var/lib/maas/dhcpd.sock");
  }
  on release {
    set clhw = 
       binary-to-ascii (16, 8, ":", 
                        substring (hardware, 1, 6)) ;
    set clip = 
       binary-to-ascii (10, 8, ".", leased-address) ;
    execute ("/usr/sbin/maas-dhcp-helper", "notify", "--action", "release",
        "--mac", clhw, "--ip-family", "ipv4", "--ip", clip, "--socket", "/var/lib/maas/dhcpd.sock");
  }
}

Later on it requests an update on the IP number and receives the IP number 192.168.30.169 (but the database configuration entry on maas remains at the old 192.168.29.237 address). Note that this is a /22 subnet, so 192.168.29.x and 192.168.30.x are in the same range.

}
lease 192.168.30.169 {
  starts 3 2023/11/08 19:45:03;
  ends 3 2023/11/08 19:55:03;
  tstp 5 2023/10/06 02:33:42;
  tsfp 3 2023/11/08 20:00:03;
  atsfp 3 2023/11/08 20:00:03;
  binding state active;
  next binding state expired;
  hardware ethernet ac:1f:6b:b6:a4:a4;
}

A related issue for Maas 3.3 is here, concerning /usr/sbin/maas-dhcp-helper

The problem persists even for newly enrolled nodes on RC2 1:3.4.0~rc2-14317-g.15c0

Hi @smolix ,

Can you confirm this is your same scenario? See also this

Hi @r00ta - many thanks for the information. We’re new to Maas and indeed, this seemed like the most natural thing that Maas would get this right, in particular as it detects the IP / MAC automatically when enrolling a machine via PXE. We’ll use the recommended fix of DHCP snippets, i.e. by manually fixing the machines:

host machine-01 {
hardware ethernet XX:XX:XX:XX:XX:XX;
fixed-address 192.168.10.10;
}

Many thanks. This fixed things!