[Pdns-dev] Cant get getDomainInfo on Remote backend to work

Aki Tuomi cmouse at cmouse.fi
Fri Jan 24 16:41:59 UTC 2020


On Sat, Jan 25, 2020 at 12:38:26AM +0930, Austin Brandis wrote:
> Hi,
> 
> Please let me know if I'm not on the right mailing list.
> I've searched all the github issues, and elsewhere but have not found
> anything helpful.
> 
> Currently developing a remote backend, but am having some trouble with the
> getDomainInfo call.
> 
> I'm making a POST request to the web API to /domain/add
> 
> Here is where I get lost...
> My backend receives a getDomainInfo query after an Initialize.
> Whilst I found this initially odd, I figured that maybe PDNS was confirming
> the presence of any domain first, and then an "set" query would be issued
> later.
> Though the documentation for remote backend (
> https://doc.powerdns.com/authoritative/backends/remote.html) also does not
> indicate which "query" does the adding.
> I figured I'd just work it out when the relevant JSON arrives.
> 
> My backend receives a getDomainInfo JSON as such
> <https://doc.powerdns.com/authoritative/backends/remote.html#getdomaininfo>
> e.g.  {"method":"getdomaininfo","parameters":{"name":"foo.com"}}
> 
> when foo.com does not exit it is unclear in the documentation what the
> backend should return.
> No matter what I try the HTTP response from the WEB API after the POST is
> always 400, and PDNS closes the socket to my backend.
> All suggesting PDNS remote is not happy with the JSON response to the
> getDomainInfo query
> 
> I have tried
> {"result":{}}
> {"result":""}
> {"result":null}
> {"result":false}
> {"result":"zone":{}}
> {"result":"zone":""}
> {"result":"zone":null}
> responses, but none work.
> 
> What am I doing wrong ?
> I assume domain additions are implemented in remote backend ?
> 
> Thanks
> Austin

Hi!

"You must always reply with JSON hash with at least one key, ‘result’. This must be boolean false if the query failed."

If this does not work though, it could be a bug. Is there anything in logs?

Aki


More information about the Pdns-dev mailing list