[Pdns-users] change_date and API
Eric Beck
ericbeck at cadns.ca
Fri Nov 24 16:51:53 UTC 2017
Hello Chris.
I had not seen those options in pdns_server as I had not delved into the
operation of that utility.
However, after doing so, I note that there doesn't appear to be any
clear documentation on usage related to API in particular .... part of
that being that I missed some sections in the docs online, due to using
the menu system on the left ... also not downloading the pdf format ...
yes I know I'm welcome to contribute ... not knowledgeable about GitHub
processes yet ...
from experimenting, I discovered that you can set this for the gmysql
backend using the gmysql-insert-record-query= configuration setting in
pdns.conf
where the original default setting was,
gmysql-insert-record-query=insert into records
(content,ttl,prio,type,domain_id,disabled,name,ordername,auth,change_date)
values (?,?,?,?,?,?,?,?,?,NULL)
If you change the NULL to UNIX_TIMESTAMP()
gmysql-insert-record-query=insert into records
(content,ttl,prio,type,domain_id,disabled,name,ordername,auth,change_date)
values (?,?,?,?,?,?,?,?,?,UNIX_TIMESTAMP())
This appears to work correctly to update the change_date in conjunction
with the webserver API for either inserting new records in an RRSET, or
modifying existing records in an RRSET (using master branch PowerDNS
Authoritative Server 0.0.1983g43fd645)
Thanks for pointing me in the right direction Chris.
Eric
On 11/24/2017 6:05 AM, Christian Hofstaedtler | Deduktiva wrote:
> * Eric Beck <ericbeck at cadns.ca> [171123 21:27]:
>> Issue: When using the API, and gmysql backend, the change_date column is
>> not updated.
>
> Usage of change_date is mostly local policy, and if you need it, you
> can change the predefined SQL queries for your backend.
>
> Cheers
> Chris
>
More information about the Pdns-users
mailing list