DHCP IPs when Machines are left Powered On after commissioning

Hi Team,

I have an all-in-one setup running MaaS 3.5.6 setup using apt.

I have around 50 machines all in Ready state and have Power State: ON. What I have noticed is all these machines although have a DHCP IP, they have valid_lft forever preferred_lft forever (which means the dhcp client won’t renew the lease because of valid_lft forever) for the interface.

root@server1:~# ip a l eno5
2: eno5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 40:b5:c1:4a:6a:6c brd ff:ff:ff:ff:ff:ff
    altname enp64s0f0
    inet 172.20.124.214/24 metric 100 brd 172.20.124.255 scope global eno5
       valid_lft forever preferred_lft forever
    inet6 fe80::42b5:c1ff:fe4a:6a6c/64 scope link
       valid_lft forever preferred_lft forever
root@server1:~#

Because the dhcp client in Ready machines don’t renew the lease, will maas rack server start selecting IPs that are associated with Ready machines (which will result in an IP-conflict forcing a reselction of IP from available pool )?

thanks!

Is this a hypothetical general question or a behavior that you actually observed?

In the past, I observed a behaviour where new baremetal machines where failing to PXE boot. Maas-dhcp server logs had mentions about IP-conflict and it trying a couple of next available IP. Because there is a timeout in most of the NIC firmware, PXEboot attempt fails after some x seconds. Unfortunately, I cannot find those logs now. A workaround for the issue was to power off machines in Ready state.

We have a requirement to power on the machines, because our hardware check automation was failing for powered-off machines.

Before I power - on commissioned machines, I wanted to understand how the DHCP lease story works for machines in Ready state.

thanks!

When selecting a new IP, the lease table will be consulted, but also, the IP will be pinged. So if you have a lot of used IPs that are not in the lease table, many IPs might have to be pinged before finding a free one, which take a long time.