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
Co-Authored-By: Kevin Bringard <kevinbri@cisco.com>
(cherry picked from commit 74a16fde1c
)
This commit is contained in:
parent
dd715d9bb9
commit
ed799e38fe
|
@ -374,6 +374,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
|
||||
|
|
|
@ -780,7 +780,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']
|
||||
|
||||
seconds = ''
|
||||
if lease_duration == -1:
|
||||
|
|
Loading…
Reference in New Issue