<div dir="ltr">Hi Simon,<div><br></div><div style>Thanks for clarifying and giving insights into your long term ideas.</div><div style><br></div><div style>Niels Basjes</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Apr 12, 2013 at 11:42 AM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 10/04/13 19:31, Niels Basjes wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Yes, that is what I have now.<br>
But why the reload of dnsmasq for trivial changes?<br>
<br>
Wayback I've played with an LDAP connector for the ISC DHCPD and I was<br>
simply wondering if dnsmasq has a similar feature (or if it would even be<br>
possible to have for dnsmasq).<br>
<br>
</blockquote>
<br></div>
Regardless of the source of configuration information, I'd be very wary of adding something which makes live queries against any database system. There are a couple of reasons for this: firstly, to keep the memory footprint small, dnsmasq controls concurrency quite carefully. If there was a database lookup which might block in the main codepath, either dnsmasq would have to bloat to allow more concurrent processing of DNS queries, or it would have to run the risk that database-access blocking  would stop all DNS queries for the duration.<br>

<br>
Secondly, there's a massive risk of deadlock, can be guarantee that your database backend never needs to make a DNS query? If not your risk the database waiting on dnsmasq, whilst dnsmasq is waiting on the database, and both will wait forever.<br>

<br>
I have a long-term vision of fixing the configuration system which involves:<br>
<br>
1) Splitting the config into that which requires a restart and that which doesn't.<br>
<br>
2) Providing a modular API to allow the configuration which doesn't require restart to come from any source. One of these would be the traditional config file, of course.<br>
<br>
3) Coding a way to re-read the configuration via the above module(s) and then atomically insert the new config without stopping dnsmasq, which would allow the configuration module to access LDAP or databases without the risk of deadlock via DNS queries.<br>

<br>
<br>
Cheers,<br>
<br>
<br>
Simon.<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Wed, Apr 10, 2013 at 8:13 PM, sven falempin<<a href="mailto:sven.falempin@gmail.com" target="_blank">sven.falempin@gmail.<u></u>com</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
why a database in your case ?<br>
<br>
kill -HUP<br>
init.d/... reload<br>
<br>
<<<br>
DNSMASQ considerations<br>
<br>
If using dnsmasq, the template file is /etc/cobbler/dnsmasq.template but<br>
it basically works as for ISC (above). Remember that dnsmasq also provides<br>
DNS.<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
</blockquote></blockquote>
<br>
<br>
On Wed, Apr 10, 2013 at 8:57 AM, Niels Basjes<<a href="mailto:dnsmasq@basjes.nl" target="_blank">dnsmasq@basjes.nl</a>>  wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Is it possible to store the config of dnsmasq in some kind of database?<br>
What I would like is to be able to have an other tool (like cobbler) to<br>
update the config (i.e. add/remove host definitions, cnames and such)<br>
without the need to restart dnsmasq.<br>
<br>
Is this possible?<br>
<br>
--<br>
Met vriendelijke groeten,<br>
<br>
Niels Basjes<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a><br>
<br>
<br>
</blockquote>
<br>
<br>
--<br>
<br>
------------------------------<u></u>------------------------------<u></u>------------------------------<u></u>---------------------------<br>
() ascii ribbon campaign - against html e-mail<br>
/\<br>
<br>
</blockquote>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a><br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
Dnsmasq-discuss mailing list<br>
<a href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk" target="_blank">Dnsmasq-discuss@lists.<u></u>thekelleys.org.uk</a><br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss" target="_blank">http://lists.thekelleys.org.<u></u>uk/mailman/listinfo/dnsmasq-<u></u>discuss</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Met vriendelijke groeten,<br><br>Niels Basjes
</div>