[Kea-users] Suggestions requested

Tom Gillman Tom.Gillman at virtustream.com
Wed Aug 15 01:08:49 UTC 2018


It doesn’t, at least not according to my interpretation of the documentation in the Kea Administrator’s Guide, Section 14.4.4

I very specifically need to query an external service (*NOT* a database), and then generate a lease (or reservation) based on the information returned from that query.
My conundrum is that I can call an external script, but because the DHCP server blocks waiting on the script to complete, I cannot update the lease information until the script exits.

Thanks,

-T

From: Kea-users [mailto:kea-users-bounces at lists.isc.org] On Behalf Of Joseph Bernard
Sent: Tuesday, August 14, 2018 7:34 PM
To: kea-users at lists.isc.org
Subject: Re: [Kea-users] Suggestions requested

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/20180815/c0fcad2a/attachment.htm>


More information about the Kea-users mailing list