Discussion:
[Dnsmasq-discuss] Is there a way to disable file/directory polling for specific addn-hosts files or conf-dir changes?
TheWerthFam
2017-01-22 13:06:12 UTC
Permalink
The openwrt platform I'm using seems to support the ionotify feature( I
believe that many openwrt platforms don't). The application I'm working
on updates files in the addn-hosts and conf-dir daily. When this
happens the dnsmasq process identifies that files have changed and
automatically tries to reload/reread them(I understand because of the
dnsmasq option polling). For some reason dnsmasq doesn't seem to
reload/reread them well/properly. The reload process takes 5 minutes at
very high cpu load on a reload/reread. Where if dnsmasq where just
restarted it startups with in 10 seconds, while also loading the entries
in the addn-hosts and conf-dir locations.

Question is: Is there a way to either turn off polling for just these
specific addn-hosts and conf-dir locations while keeping the polling
active to allow dnsmasq to watch /etc/hosts and /etc/resolv.conf as normal?
Or to force a restart on file change vs a reload/reread as it does now?

Thanks
Derek
Simon Kelley
2017-01-23 11:45:07 UTC
Permalink
Dnsmasq won't re-read /etc/hosts or files in a directory specified by
- --addn-hosts automatically. It _will_ re-read files in a directory
specified by --hostsdir. Armed with that information, the first thing
to do might be to look at exactly what configuration you're using.

Once that's sorted out, I'd be interested to know why dnsmasq is
behaving so badly in that case. Are these files very big?


Cheers,

Simon.
Post by TheWerthFam
The openwrt platform I'm using seems to support the ionotify
feature( I believe that many openwrt platforms don't). The
application I'm working on updates files in the addn-hosts and
conf-dir daily. When this happens the dnsmasq process identifies
that files have changed and automatically tries to reload/reread
them(I understand because of the dnsmasq option polling). For some
reason dnsmasq doesn't seem to reload/reread them well/properly.
The reload process takes 5 minutes at very high cpu load on a
reload/reread. Where if dnsmasq where just restarted it startups
with in 10 seconds, while also loading the entries in the
addn-hosts and conf-dir locations.
Question is: Is there a way to either turn off polling for just
these specific addn-hosts and conf-dir locations while keeping the
polling active to allow dnsmasq to watch /etc/hosts and
/etc/resolv.conf as normal? Or to force a restart on file change vs
a reload/reread as it does now?
Thanks Derek
_______________________________________________ Dnsmasq-discuss
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Loading...