[Kea-users] Suggestions requested
Tom Gillman
Tom.Gillman at virtustream.com
Tue Aug 14 21:05:07 UTC 2018
Howdy folks,
I'm trying to implement something with kea and I was hoping to pick the hive brain.
What I'm trying to do is, on a request for DHCP, format a JSON query to a network service that will return a hostname and IP address. Then, generate a lease (using memfile) which then gets returned to the requesting client. I can do all that in a shell, which I was using the kea-hook-runscript hook library to do. The first part all works well. The problem comes in trying to update the memfile. The kea-hook-runscript calls an external shell to do the work, and blocks waiting on that shell to exit. Because it's blocked, I can't issue any lease commands through the control channel to do the updates I desire.
I'm not sure how to get around this, I feel like making the external callout non-blocking would introduce race conditions that would bite me later on. The only real solution I see is use a 3rd-party DB like mysql and handle the updates within the script, but that introduces overhead that I'm unwilling to do.
I'm not much of a programmer, so saying "Build your own hook library" really isn't an option given the time constraints I'm under. I feel like I might eventually be able to it, but I simply don't have the time.
Does anyone have any suggestions? Any constructive criticism is appreciated.
Thanks,
-Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20180814/ac29c13e/attachment.htm>
More information about the Kea-users
mailing list