[bind10-dev] 转发: Should zonemgr refresh expired zones(Re: zonemgr / notify out questions)
Jerry
jerry.zzpku at gmail.com
Tue Sep 14 04:10:48 UTC 2010
> > When zone refresh timer finds a zone's master servers can't be
> reached for "expire" time
> > (now - last_refresh_time >= expire time), the zone will become
> expired.
> > But if zonemgr receives notify-in messages for a expired zone, it
> will still try to connect
> > to the zone's master servers and do refresh again.
>
> It seems broken to me.
>
> See trunk/src/bin/zonemgr/zonemgr.py.in _zone_is_expired
>
> Is the test backwards?
>
> if (ZONE_EXPIRED == self._get_zone_state(zone_name_class) or
> zone_last_refresh_time + zone_expired_time <=
> self._get_current_time
>
> return True
>
> If the previous time plus the SOA expire is less than current time,
> then it should return False.
I think (zone_last_refresh_time + zone_expired_time <=
self._get_current_time) is the same as (now - last_refresh_time >=
expire_time) I mentioned before, which means a zone's master server can't be
reached for "expire" time, so the zone has become expired, it should return
True.
> And is that misnamed? "last_refresh" as expired is not based on a
> single last refresh only.
Each zone only has one "zone_last_refresh_time", which will be changed by
the following events:
*zone_mgr load the zone
*no need to do xfr, but received soa from master server success
*axfr/ixfr success
> Also for some zones I get repeated "expired" logging for the same zone
> -- even when no notify is sent to it to restart this counter.
The current logic is :
If a zone has been marked as expired, the "expired" logging should not echo
any more. I'll check it.
> And it does a AXFR-in even if the SOA serial doesn't increase. For
> example, my zone has a SOA refresh of 10. Approximately every ten
> seconds, it will do a new AXFR transfer. This keeps repeating even
> though the master's serial for that zone never changes. This stops
> doing
> the zone transfers once it reaches the SOA expired (and says zone "is
> expired.")
Because xfrout hasn't add soa check yet, which will ask for axfr once it
received a zone refresh request from zonemgr. This has been added into
Xfrout TODO list.
> 19) Is random Refresh jitter defined in any specification? I see it
> uses between (zone_refresh_time - ((1 * zone_refresh_time) / 4)) and
> zone_refresh_time.
I defined the refresh jitter value according to BIND9, which is suggested by
jinmei. Maybe we can improve it.
* When bind9 starts, jitter for refresh time is rand() % (retry * 3 / 4)
* Refresh fails, jitter for next refresh time is rand() % (retry / 4)
* Refresh successes, jitter for next refresh time is rand() % (refresh/4)
I also have a question:
Should zonemgr try to refresh an expired zone? Because a zone may become
expired even though it haven't try to do refresh before.
Thanks.
More information about the bind10-dev
mailing list