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
This commit is contained in:
parent
64bd24f9d6
commit
74a16fde1c
|
@ -318,6 +318,7 @@ class Dnsmasq(DhcpLocalProcess):
|
|||
'--addn-hosts=%s' % self.get_conf_file_name('addn_hosts'),
|
||||
'--dhcp-optsfile=%s' % self.get_conf_file_name('opts'),
|
||||
'--leasefile-ro',
|
||||
'--dhcp-authoritative',
|
||||
]
|
||||
|
||||
possible_leases = 0
|
||||
|
|
|
@ -728,7 +728,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