On 29-08-17, Tomek Mrugalski wrote:
> I always thought about writing this kind of hook, but never had time for
> that and hoped someone would write it one day. And here you are. Great!
> 
> Thanks for writing it and sharing. I have not tested it yet, but the
> code looks good at first glance.

Cool, thanks!  If/when you use it, it will be interesting to share your
use-cases.  I'm sure there are tons of unanticipated use-cases.

> One thing you should consider in the future is that if the script takes
> a long time to execute, it will freeze whole Kea execution. You may add
> a knob that lets the user pick - whether he wants to wait for the script
> completion or not.

Hmm, I'm not sure it's such a good idea.  Because then, the script would
need to handle concurrent executions, which quickly becomes a mess.
Locking is a solution, but you would have to be careful not to create a
fork-bomb with all those scripts waiting for a lock...

For potential « heavyweight scripts » use-cases, I think a better solution
would be a standalone process running alongside Kea, and a way for Kea to
communicate information to this standalone process (for instance via a
Unix socket).  Or just write a custom Kea hook.  Anyway, my use-case only
involves small shell scripts that should not block, so I'll leave this for
someone else to think about :)

Thanks,
Baptiste

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to