Server creates a false disconnect event on Kea hook conflict
The Kea daemon can be configured to use the host_cmds
hook and RADIUS backend simultaneously. The RADIUS backend doesn't support listing host reservations. It causes the reservation-get-page
command fails due to an unsupported exception. Stork's host puller uses this command to update the host reservations data.
2022-06-29 07:50:52.273 INFO [kea-dhcp4.commands/443501.139831042103424] COMMAND_RECEIVED Received command 'reservation-get-page'
2022-06-29 07:50:52.275 ERROR [kea-dhcp4.callouts/443501.139831042103424] HOOKS_CALLOUT_ERROR error returned by callout on hook 3 registered by library with index $reservation_get_page (callout address 0x7f2cebb0b540) (callout duration 1.420 ms)
Stork has multiple pullers working parallel. When any fails, the server produces a disconnect event and displays a warning message.
{
"createdAt": "2022-06-29T14:30:51.561Z",
"id": 51358,
"level": 2,
"text": "Communication with <daemon id=\"2\" name=\"dhcp4\" appId=\"1\" appType=\"kea\"> of <app id=\"1\" name=\"Primary\" type=\"kea\" version=\"1.8.2\"> failed"
},
Any subsequent success pulling from any puller (it may be different than a puller that notified connection problems) produces a resumed connection event.
{
"createdAt": "2022-06-29T14:31:11.658Z",
"id": 51360,
"level": 1,
"text": "Communication with <daemon id=\"2\" name=\"dhcp4\" appId=\"1\" appType=\"kea\"> of <app id=\"1\" name=\"Primary\" type=\"kea\" version=\"1.8.2\"> resumed"
},
It causes to generate tons of events and false alerts. We should gracefully handle the hook conflict and stop or mute a puller in this situation. Additionally, a config checker should report an unsupported hook combination.