Imho, proper fix requires obtaining control over lease process, might be possible with dnsmasq witha --dhcp-script option together with --leasefile-ro (maybe) - and writing our own lease management, for which we will have full control, preventing any IP duplication. Alternativey we need to switch to a different DHCP server which provides API/CLI to control leases. The we can set static leases for all nodes except "discover", and remove them on reset / deletion of node. I'll try to look into dnsmasq, but it may be wiser in long term to switch to something like ISC DHCP server (dhcpd).
Imho, proper fix requires obtaining control over lease process, might be possible with dnsmasq witha --dhcp-script option together with --leasefile-ro (maybe) - and writing our own lease management, for which we will have full control, preventing any IP duplication. Alternativey we need to switch to a different DHCP server which provides API/CLI to control leases. The we can set static leases for all nodes except "discover", and remove them on reset / deletion of node. I'll try to look into dnsmasq, but it may be wiser in long term to switch to something like ISC DHCP server (dhcpd).