[Dnsmasq-discuss] How does DNSMASQ handle large concurrent configure file updating request requests

Yongkang You yongkang.you at gmail.com
Tue Feb 10 15:51:34 GMT 2015


On Mon, Feb 9, 2015 at 11:49 PM, Simon Kelley <simon at thekelleys.org.uk>
wrote:

> You should see something like
>
> dnsmasq: inotify, new or changed file /tmp/hosts/testone
> dnsmasq: read /tmp/hosts/testone - 1 addresses
>
> Just to check the argument to hostsdir is a directory, and not a file?
>
> Any errors logged at startup?
>

Simon,

I used the config like this:

---------dnsmasq.conf----------
...
dhcp-hostsdir=/etc/hosts.dhcps/
dhcp-optsdir=/etc/hosts.options/
hostsdir=/etc/hosts.dnss/
...
----------end---------
-bash-4.1# ls /etc/hosts.dnss/
fa:cd:42:cf:50:00  fa:ed:12:0d:ad:00

-bash-4.1# cat /etc/hosts.dnss/*
10.11.30.33 10-11-30-33.test1.org
10.11.109.127 10-11-109-127.test1.org


>From the dnsmasq.log:
-bash-4.1# tail -f /var/log/dnsmasq.log
Feb 10 15:49:56 dnsmasq[24347]: started, version 2.73test5-12-g2941d3a
cachesize 150
Feb 10 15:49:56 dnsmasq[24347]: compile time options: IPv6 GNU-getopt
no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth
no-DNSSEC loop-detect inotify
Feb 10 15:49:56 dnsmasq-dhcp[24347]: DHCP, static leases only on 10.11.0.1,
lease time 1h
Feb 10 15:49:56 dnsmasq[24347]: reading /etc/resolv.conf
Feb 10 15:49:56 dnsmasq[24347]: using nameserver 10.0.101.1#53
Feb 10 15:49:56 dnsmasq[24347]: cleared cache
Feb 10 15:49:56 dnsmasq-dhcp[24347]: read
/etc/hosts.options//fa:ed:12:0d:ad:00
Feb 10 15:49:56 dnsmasq-dhcp[24347]: read
/etc/hosts.options//fa:cd:42:cf:50:00
Feb 10 15:49:56 dnsmasq-dhcp[24347]: read
/etc/hosts.dhcps//fa:ed:12:0d:ad:00
Feb 10 15:49:56 dnsmasq-dhcp[24347]: read
/etc/hosts.dhcps//fa:cd:42:cf:50:00

Feb 10 15:50:27 dnsmasq[24347]: inotify, new or changed file
/etc/hosts.dhcps//fa:ec:59:d0:15:00
Feb 10 15:50:27 dnsmasq-dhcp[24347]: read
/etc/hosts.dhcps//fa:ec:59:d0:15:00
Feb 10 15:50:27 dnsmasq[24347]: inotify, new or changed file
/etc/hosts.options//fa:ec:59:d0:15:00
Feb 10 15:50:27 dnsmasq-dhcp[24347]: read
/etc/hosts.options//fa:ec:59:d0:15:00


The last 4 lines show a new VM is added, configs in dhcp-hostsdir and
dhcp-optsdir are found.



-- 
Yongkang You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150210/7703bd1c/attachment.html>


More information about the Dnsmasq-discuss mailing list