[libvirt] [PATCH 01/10] conf: DHCP - add state for DHCP Relay and On/Off switch

Laine Stump laine at laine.org
Thu Feb 28 19:25:24 UTC 2013


On 02/27/2013 10:26 PM, TJ wrote:
> On 28/02/13 03:15, Eric Blake wrote:
>> Does your series ever allow dnsmasq and dhcprelay to run at the same
>> time, or can we use a single pid_t field that covers the mutually
>> exclusive choice of which helper is running based on the rest of the config?
>>
> When local DHCP server services are disabled dnsmasq is still launched since there are several non-DHCP settings in the generated config.

Right. a DNS server is run by default on any network that has an IP
address defined.

>
> In my test-bed for these patches dnsmasq and dhcp-helper will be started alongside each other.
>
> If this series is accepted I was intending to propose adding <dns enable='(yes|no)'/> 

You can consider that one pre-approved, as we've already discussed it to
death and decided it was a good idea; just nobody has gotten around to
doing it that way yet :-) (in other words, go ahead and write it; you'll
be getting it off the todo lists of at least two of us.)


> in the same style used for <dhcp> so that dnsmasq can be

Actually the enable attribute is totally unnecessary for <dhcp>, since
an absence of <dhcp> implies that it is disabled (and indeed that is
what already happens), and in the case of <dhcp relay='yes'/>, it is
also implied (since a local dhcp server and dhcp relay are mutually
exclusive). So, if there is no <dhcp> (or if it's <dhcp relay='yes'/>)
and there is <dns enable='no'/>, then dnsmasq won't be run.

The only reason we need an enable attribute for DNS is that the original
default (when there is no <dns> element) is to enable the dns server,
and we must preserve backward compatibility.




More information about the libvir-list mailing list