[Kea-users] Suggestions requested

Joseph Bernard jhb at clemson.edu
Tue Aug 14 23:34:12 UTC 2018


I believe the Host Commands Library premium hook does this.

Thanks,
Joseph B.


On Aug 14, 2018, at 5:05 PM, Tom Gillman <Tom.Gillman at virtustream.com<mailto:Tom.Gillman at virtustream.com>> wrote:

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
_______________________________________________
Kea-users mailing list
Kea-users at lists.isc.org<mailto:Kea-users at lists.isc.org>
https://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20180814/8a820e29/attachment.htm>


More information about the Kea-users mailing list