From 36c7aa6437ccf574318b838d8dffda8c7e59216b Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Wed, 20 Sep 2017 17:28:23 +0100 Subject: plugin/{file,auto}: drop fsnotify (#1090) * plugin/{file,auto}: drop fsnotify Reload every minute. This is more deterministic then fsnotify. Also other thing cropped up: sharing zone files between zone; there is only 1 fsnotify event and we need to fan out the reload to all zone files. This is a large rewrite (which could still be done), for now, poll the zone file on disk. Give serial no change a special error type so we can check for this. Improve the logging for reloading: 2017/09/19 07:34:39 [INFO] Successfully reloaded zone "miek.nl." in "db.miek.nl" with serial 128263060 2017/09/19 07:34:45 [INFO] Successfully reloaded zone "miek.nl." in "db.miek.nl" with serial 128263059 2017/09/19 07:34:51 [INFO] Successfully reloaded zone "miek.nl." in "db.miek.nl" with serial 128263060 Fixes #1013 * typo --- plugin/file/reload_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugin/file/reload_test.go') diff --git a/plugin/file/reload_test.go b/plugin/file/reload_test.go index 601c426d3..5185134a2 100644 --- a/plugin/file/reload_test.go +++ b/plugin/file/reload_test.go @@ -31,7 +31,9 @@ func TestZoneReload(t *testing.T) { t.Fatalf("failed to parse zone: %s", err) } + TickTime = 500 * time.Millisecond z.Reload() + time.Sleep(time.Second) r := new(dns.Msg) r.SetQuestion("miek.nl", dns.TypeSOA) -- cgit v1.2.3