[Pdns-users] Adding library lua functions for lua records

Jason Tremblett jtremblett at proofpoint.com
Mon Jul 29 18:04:35 UTC 2024


Hi all,

We are testing some ideas around lua records.  We will have a large number of zones that all need to share the same library code.  While we could duplicate the code in each zone individually, it will mean reloading every zone to update the code if we ever need to change it.  I tried (unsuccessfully) to create a library zone and load the code from there (e.g. "include ('code.other.domain.com') myFunction(...)") as well as creating a shared lua context and then trying to call the global functions from a different zone or record in the same zone without the include on a later request, but neither seemed to work for me the way I tried them.  It would be great if we could just always load our lua library along with the built in functions if that would work (this seems like it might require a feature request).  I am able to use the functions successfully from a record in the same zone, but only if I load them on every record.  Is what I am trying to do currently possible?  Can you point me to an example of how this might work if it is?

Thanks!

Jason Tremblett


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20240729/bf7b477c/attachment.htm>


More information about the Pdns-users mailing list