I've looked into dnsmasq lease control option and looks like there ain't any - dnsmasq can have an external database (with --dhcp-script and --leasefile-ro) BUT it will still maintain it's in-memory copy and provide new IPs based on that. This means that we cannot dynamically pre-allocate IPs outside dnsmasq without restarting it - it will not get the new values automatically, which makes the whole process unreliable (there will be a race between IP update in our code and dnsmasq's giving out new IPs before it's restarted, also frequent dnsmasq restarts may cause dhcp renew issues). So far I only see the path of switching to a different dhcp server + writing IP management code to control it.
I've looked into dnsmasq lease control option and looks like there ain't any - dnsmasq can have an external database (with --dhcp-script and --leasefile-ro) BUT it will still maintain it's in-memory copy and provide new IPs based on that. This means that we cannot dynamically pre-allocate IPs outside dnsmasq without restarting it - it will not get the new values automatically, which makes the whole process unreliable (there will be a race between IP update in our code and dnsmasq's giving out new IPs before it's restarted, also frequent dnsmasq restarts may cause dhcp renew issues). So far I only see the path of switching to a different dhcp server + writing IP management code to control it.