Kea freezes on config reload when using host commands and host database.
Kea freezes during configuration reload.
Last log message: DHCPSRV_TIMERMGR_START_TIMER starting timer: memfile-lfc
.
This behavior is random. It occurs about 75% of the time when I try to trigger it with the same steps. On about 25% of runs, Kea reconfigures correctly and runs normally.
It happens on both MySQL and PostgreSQL.
Steps to reproduce:
- Run kea with
/sbin/keactrl start
using the config file provided below. - Reconfigure kea by running
/sbin/keactrl reload
(you can use the same configuration file) - Kea freezes on
DHCPSRV_TIMERMGR_START_TIMER starting timer: memfile-lfc
- Kea does not respond to the control agent or DHCP traffic.
Configuration required to trigger freeze: hooks-libraries: libdhcp_mysql.so(or libdhcp_pgsql.so),libdhcp_host_cmds.so ; and configured hosts-database.
You can omit libdhcp_host_cmds.so
in the config file used to reload, and a freeze will still occur, but it has to be present in the original config used to start Kea.
I did not test if keactrl
is required to trigger freeze.
Simpliest config that triggers the freeze:
{
"Dhcp4": {
"hooks-libraries": [
{
"library": "/home/mgodzina/installed/keadev/lib/kea/hooks/libdhcp_mysql.so"
},
{
"library": "/home/mgodzina/installed/keadev/lib/kea/hooks/libdhcp_host_cmds.so"
}
],
"hosts-database": {
"host": "",
"name": "keadb",
"password": "keapass",
"type": "mysql",
"user": "keauser"
},
"interfaces-config": {
"interfaces": [
"enp0s9"
]
},
"lease-database": {
"type": "memfile"
},
"loggers": [
{
"debuglevel": 99,
"name": "kea-dhcp4",
"output-options": [
{
"output": "/home/mgodzina/installed/keadev/var/log/kea.log"
}
],
"severity": "DEBUG"
}
],
"option-data": [],
"rebind-timer": 2000,
"renew-timer": 1000,
"shared-networks": [],
"valid-lifetime": 4000
}
}
Log file:
Edited by Marcin Godzina