dnsmasq option --dhcp-lease-max prevents startup for more than 1 network
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt |
Invalid
|
Medium
|
|||
libvirt (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Maverick |
Invalid
|
Low
|
Unassigned | ||
Natty |
Invalid
|
Low
|
Unassigned |
Bug Description
If one configures more than one network to use DHCP, multiple dnsmasq processes are started, one for each network. The problem is that each process has --dhcp-lease-max configured for the number of leases in it's own network. But since multiple dnsmasq processes share the standard lease file it's possible that more leases are already in the lease file than the newly configured network yielding an error when the new dnsmasq tries to start:
dnsmasq: too many stored leases
Steps to Reproduce:
1. define a /24 network in libvirt
2. obtain (or simulate by populating the leases file) 30 leases
3. define a second /28 network
Actual results:
libvirtd will report:
09:46:47.004: error : virRunWithHook:857 : internal error '/usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file=
10.0.1.1,10.0.1.14 --dhcp-
dnsmasq: too many stored leases
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libvirt-bin 0.8.3-1ubuntu14
ProcVersionSign
Uname: Linux 2.6.35-24-generic i686
NonfreeKernelMo
Architecture: i386
Date: Fri Feb 4 07:53:44 2011
ProcEnviron:
PATH=(custom, user)
LANG=en_CA.UTF-8
SHELL=/bin/bash
SourcePackage: libvirt
Changed in libvirt (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in libvirt (Ubuntu Natty): | |
status: | New → Invalid |
Changed in libvirt (Ubuntu Maverick): | |
status: | New → Invalid |
Changed in libvirt: | |
importance: | Unknown → Medium |
status: | Unknown → Invalid |
Description of problem:
If one configures more than one network to use DHCP, multiple dnsmasq processes are started, one for each network. The problem is that each process has --dhcp-lease-max configured for the number of leases in it's own network. But since multiple dnsmasq processes share the standard lease file it's possible that more leases are already in the lease file than the newly configured network yielding an error when the new dnsmasq tries to start:
dnsmasq: too many stored leases
Version-Release number of selected component (if applicable):
0.8.5
How reproducible:
100%
Steps to Reproduce:
1. define a /24 network in libvirt
2. obtain (or simulate by populating the leases file) 30 leases
3. define a second /28 network
Actual results:
libvirtd will report:
09:46:47.004: error : virRunWithHook:857 : internal error '/usr/sbin/dnsmasq --strict-order --bind-interfaces --pid-file= /var/run/ libvirt/ network/ test.pid --conf-file= --listen-address 10.0.1.1 --except-interface lo --dhcp-range 10.0.1.1,10.0.1.14 --dhcp- lease-max= 14' exited with non-zero status 5 and signal 0:
dnsmasq: too many stored leases
Expected results:
Should add the network and start the dnsmasq process without error.
Additional info:
Probably the "-l" option to dnsmasq would be useful here to create per network lease files.