I'm having a problem getting a PowerDNS ifportup lua record working. I'm new to PowerDNS and know DNS relatively well. I'd appreciate if anyone could point out where I'm going wrong here.
Background - I'm running this on Debian 11 to a sqlite backend. Packages installed...
pdns-server
pdns-backend-sqlite3
pdns-backend-bind (I think this autoinstalled?)
pdns-backend-lua2
The record...
fuse-smtp.mydomain.com 30 IN LUA A "ifportup ( 25, { { '1.2.3.4' }, { '5.6.7.8' } } )"
The intention is to health check the two SMTP servers on those IPs and return 1.2.3.4 as primary if port 25 is up on that IP. The server on 5.6.7.8 is backup.
That lua record is the spaced out version. I've tried deleting and adding the record with spacing, without spacing, without TTL, with tabs and a few broken formats that pdnsutil wouldn't accept. Any accepted record fails equally with the same error. A equivalent AAAA record with IPv6 IPs fails too.
I've got syslog going with log level 9, here's the reported error...
Apr 24 14:03:56 ns1 pdns[2241120]: Lua record (fuse-smtp.mydomain.com|A) reported: Unable to convert parameter from table to St6vectorISt4pairIiNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESaIS7_EE#012stack traceback:#012#011[C]: at 0x564c3ff1c4b0
A bit more background. I created the domain with this command...
sudo -u pdns pdnsutil create-zone mydomain.com ns1.anotherdomain.net.
I'm editing the domain like so...
pdnsutil edit-zone mydomain.com
The PowerDNS service is working, the domain is working, simpler A, AAAA, MX and TXT records are resolving. I've got other lua records working, such as this...
fuse.mydomain.com 30 IN LUA A "ifurlup('http://www.anotherdomain.net/', {{'1.2.3.4'}, {'5.6.7.8'}} )"
It's just that ifportup record failing. No other errors are reported in the pdns syslogs.
Appreciate any and all pointers here. Thanks.