Pass '--dhcp-authoritative' option to dnsmasq
When dnsmasq is restarted, it forgets about all leases (since it runs
with leasefile-ro option). When client tries to renew its lease, dnsmasq
sends DHCPNAK reply with message "lease not found". Then client shuts
down the network and re-request lease from DHCP server (and gets exactly
same IP address). There's a small network downtime which affects
services, like zookeeper, running in VMs.
Change-Id: Ieff0236670c1403b5d79ad8e50d7574c1b694e34
Closes-Bug: #1345947
(cherry picked from commit 74a16fde1c
)
This commit is contained in:
parent
4076e7cae8
commit
c3a88a578f
|
@ -338,6 +338,7 @@ class Dnsmasq(DhcpLocalProcess):
|
|||
'--addn-hosts=%s' % self._output_addn_hosts_file(),
|
||||
'--dhcp-optsfile=%s' % self._output_opts_file(),
|
||||
'--leasefile-ro',
|
||||
'--dhcp-authoritative',
|
||||
]
|
||||
|
||||
possible_leases = 0
|
||||
|
|
|
@ -697,7 +697,8 @@ class TestDnsmasq(TestBase):
|
|||
'--dhcp-hostsfile=/dhcp/%s/host' % network.id,
|
||||
'--addn-hosts=/dhcp/%s/addn_hosts' % network.id,
|
||||
'--dhcp-optsfile=/dhcp/%s/opts' % network.id,
|
||||
'--leasefile-ro']
|
||||
'--leasefile-ro',
|
||||
'--dhcp-authoritative']
|
||||
|
||||
expected.extend(
|
||||
'--dhcp-range=set:tag%d,%s,static,86400s' %
|
||||
|
|
Loading…
Reference in New Issue