On 09/19/2016 09:48 AM, Martin Wilck wrote:
Hello,
I am seeing a slightly annoying behavior of libvirt-created networks on
my system. Whenever a VM fails to renew its DHCP lease in time (for
example because my laptop is suspended), the IP address changes,
causing various annoyances. If this happens, the log message
"DHCPNAK(virbrX): ... lease not found" appears in the libvirtd logs.
Looking at the dnsmasq code, it seems that this would be fixed by
running dnsmasq with the "dhcp-authoritative" option, which, according
to the dnsmasq man page, "should be set when dnsmasq is definitely the
only DHCP server on a network" - IMO that's the case for libvirtd-
managed virtual networks. So the question comes to my mind: is there a
good reason why libvirtd doesn't set "dhcp-authoritative" on the
dnsmasq instances it starts?
I've searched the list archives and didn't see any mention of the
'--dhcp-authoritative' option, so the reason may be that no one has made such an
inquiry :-). If it has been discussed and I missed it, Laine most likely knows
something about it.
A small bit of detective work shows that OpenStack neutron adopted use of this
option a while back
https://review.openstack.org/#/c/152080/
In a related discussion, Simon agrees with using '--dhcp-authoritative' when
dnsmasq is the only dhcp server on the network
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2015q1/009171.html
I also stumbled across a complaint about using '--dhcp-authoritative' on a
network with multiple dhcp servers, but I can't find that now. I'm not sure if
there are use-cases for multiple dhcp servers on a single libvirt virtual network.
Regards,
Jim