-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSD doesn't refresh zones after extended downtime #25
Comments
Hi Anand, |
Hi Wouter! Thanks for the fix. Actually I was aware of this issue for ages, but kept forgetting to open a report. Today, when I built 4.2.1 for testing, and noticed it again, I decided to open the report before I forgot again. I will try to rebuild with this patch and report to you, or just test with 4.2.2 comes out. |
Hi Wouter. I tried this today, and it works as you described. NSD starts, notices that the zones are way out of date, and schedules refresh for them with a random delay of up to 10 seconds. I guess this is fine, but in reality, there is probably no need for the delay, because it would be fine if NSD just immediately refreshes the zones. If you start NSD without any zone files or xfrd.state, then it XFRs all the slaves zones in immediately. It doesn't make too much sense to add a random 10s delay for this specific case of extended downtime. For consistency, if you're going to add a random delay, then it should be for all cases, to avoid flooding a master server. |
Hi Anand. Yes that is right, fixed it in commit 784600e where it fetches immediately, and then if that needs retries, the already existing logic for spreading retries can spread load. This is also how it works when NSD is started without files. So this fix makes all the zones get fetched immediately. |
I have a test server, where I had last run NSD in March 2019. Then I had shut it down. Today, I installed a new version of NSD, and started it. It has 3 slave zones configured. The log showed this:
Notice that NSD did not refresh any of the zones, even though they are vastly out of date. Now, this is caused by the timers on xfrd.state (which is shown below). I think the issue here is that NSD isn't checking the time of the state file with current system time, and so doesn't realise that the refresh timers are too old, and that it should immediately refresh these zones. Even at exit, it still saves the refresh timers, and won't update if I start it again. I think the value of
next_timeout
should take into account the current system time.The text was updated successfully, but these errors were encountered: