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

Michel Otte michel at cybox.nl
Tue Jul 30 07:32:03 UTC 2024


Hi Jason,

AFAIK only configuration data can be stored in separate records. You might
be able to use the Lua2 backend as an additional backend to achieve what
you want, but your question lacks details. Please also see:
https://blog.powerdns.com/2016/01/18/open-source-support-out-in-the-open

With that being said, a feature has just been implemented in the
development branch that allows you to globally include Lua scripts:
https://github.com/PowerDNS/pdns/issues/11676 . With some patience it will
trickle down to a stable release and of course you can already try it out.

With kind regards,
Michel Otte


Op ma 29 jul 2024 om 20:04 schreef Jason Tremblett via Pdns-users <
pdns-users at mailman.powerdns.com>:

> 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
>
>
>
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20240730/4325dfd1/attachment.htm>


More information about the Pdns-users mailing list