500 IPv4 address limit
Describe the bug When more than 500 IPv4 addresses are configured on NICs that KEA uses, no configuration changes can be made using hooks. kea-dhcp4 goes to 100% CPU load.
To Reproduce Steps to reproduce the behavior:
- Run Kea (dhcpv4) with MySQL backend for CB, leases and hosts and configured to use a NIC with 500+ IPv4 addresses on it
- Try to change configuration for example like: curl -X POST -H "Content-Type: application/json" -d '{ "command": "remote-network4-set", "service": [ "dhcp4" ], "arguments": { "shared-networks": [ { "name": "test-1", "interface": "ens37", "valid-lifetime": 60 } ], "remote": { "type": "mysql" }, "server-tags": [ "all" ] } }' http://localhost:8080/ or curl -X POST -H "Content-Type: application/json" -d '{ "command": "reservation-add", "service": [ "dhcp4" ], "arguments": { "reservation": { "subnet-id": 20001, "hw-address": "1a:2b:3c:4d:5e:6f", "ip-address": "10.0.1.2" } } }' http://localhost:8080/
- The server then goes to 100% CPU load and does not change the configuration as requested.
- Response: [ { "result": 1, "text": "unable to forward command to the dhcp4 service: Operation canceled. The server is likely to be offline" } ]
Expected behavior A clear and concise description of what you expected to happen: The server should change the configuration as requested and not keep using 100% CPU.
Environment:
- Kea version: 1.6.0
- OS: Debian 10.1 x64
- MySQL backend 8.2, library 10.3.17, Memfile backend 2.1
- libdhcp_mysql_cb.so, libdhcp_cb_cmds.so, libdhcp_host_cmds.so are loaded
Additional Information Everything works as expected with up to 499 IPv4 addresses on the NIC used by KEA. We did not test IPv6. We also did not test if the server is still able to answer to DHCP requests in the failed state.
Contacting you You can send me an e-mail to stephan@bahr-it.com