[Pdns-users] MongoDB Backend merged Re: Mongo DB and PowerDNS part 3: Now with DNSSEC
Nick Milas
nmilas at admin.noa.gr
Thu May 26 21:17:02 UTC 2011
On 26/5/2011 3:44 ÃÅÃÅ, fredrik danerklint wrote:
> Nick,
>
> To answer all of your questions, please take a look at the source file
> 'communicator.cc'. At the end of that file there is a function called
> "void CommunicatorClass::mainloop(void)" that checks slave and master every
> other 'slave-cycle-interval' seconds (parameter taken from the pdns.conf
> file). I assume that this function is running in a seperate thread.
>
> This is how PowerDNS knows when to send a update to other nameservers.
>
Actually, I am afraid things do not work like that. The
'slave-cycle-interval' parameter is only used by slaves and only when
they (the slaves) are in undetermined state, i.e. at launch. "Once a
domain has been checked, it will not be checked before its SOA refresh
timer has expired."
What I was asking is how the *Master* knows that the serial in the SOA
of one of its zones has changed. If you have not implemented some
solution, Master will never know that a serial (in its own backend!) has
been changed, unless you manually let it know. The PowerDNS
documentation states: "Some backends may be able to detect zone changes,
others may choose to let the operator indicate which zones have changed
and which havenâÂÂt. Consult the documentation for your backend to see how
it processes changes in zones." The usual logical solution is the use of
triggers (if your backend supports them).
Of course, for the Master it doesn't really matter to know that a serial
has changed, because it directly refreshes its data (which is retrieved
from the database). [ I don't know what happens with cached data, if
they are used - LDAP backend doesn't use cached data; the LDAP server
takes care of that. ] But the Master will not be able to Notify
slaves... They will wait until their refresh interval (specified in the
SOA) expires and only then they will ask the Master if serial has changed.
So, in fact you don't have what pdns calls Master operation, unless the
backend on the Master provides a mechanism to detect serial changes and
send Notify messages to slaves. If it doesn't, you must manually or
semi-manually send Notify messages, as I am also now doing with LDAP
backend, using a cron job to detect externally (i.e. not within the
backend) serial changes and to send, when such changes are detected,
Notify messages to slaves.
But I guess, when you don't have triggers, you could embed in the
backend the above procedure. You could define a time parameter (perhaps
changeable in the config) which would cycle domains (zones),
automatically, as part of the backend process and detect serial changes.
As I have explained earlier (in other threads), this works fine for a
moderate number of zones. If the number of zones is high, however, it
doesn't scale well.
Nick.
More information about the Pdns-users
mailing list