Hide Forgot
dnsmasq has an option (--dhcp-lease-max) which allows specifying the maximum number of leases allowed in the dhcp leases file. libvirt runs a separate instance of dnsmasq for each network, and sets this option to exactly the number of addresses in the dhcp range for the given network. However, by default all instances of dnsmasq (including any non-libvirt instances serving the physical network) share the same lease file, so if multiple copies of dnsmasq have all given out addresses, the lease file can fill up to the limit allowed by a particular instance long before it has actually allocated that many addresses. The solution is to use the --dhcp-leasefile argument on each dnsmasq instance to specify a separate leasefile for each. This fix has already been applied upstream: commit 13c00dde3171b3a38d23cceb3f9151cb6cac3dad Author: Laine Stump <laine> Date: Fri Mar 11 13:20:48 2011 -0500 network driver: Use a separate dhcp leases file for each network There are multiple upstream bugs filed against this problem: Bug 537335 Bug 663664 Bug 674356
A rebase of the upstream patch has been sent to rhvirt-patches for consideration: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-March/msg00335.html
v1 of the patch series was missing a prerequisite. New posting to rhvirt-patches: http://post-office.corp.redhat.com/archives/rhvirt-patches/2011-March/msg00340.html
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: In previous releases, libvirt was setting a "maximum leases" limit for dhcp leases on each virtual network according to the number of addresses available on that network, but all the networks were sharing the same leasefile, so the "max lease" limit would be reached far before all the networks had given out all their addresses. This could lead to the failure of guests to acquire an IP address. With this release of libvirt, each virtual network uses its own leasefile, so there are exactly enough slots in the leasefiles to allow all configured addresses to be allocated.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,3 +1 @@ -In previous releases, libvirt was setting a "maximum leases" limit for dhcp leases on each virtual network according to the number of addresses available on that network, but all the networks were sharing the same leasefile, so the "max lease" limit would be reached far before all the networks had given out all their addresses. This could lead to the failure of guests to acquire an IP address. +In previous releases, libvirt set a maximum lease limit for DHCP leases on each virtual network according to the number of addresses available on that network. However, all networks shared the same leasefile, so the maximum lease limit was reached long before all networks had given out all of their addresses. This meant that some guests were unable to obtain IP addresses. With this release of libvirt, each virtual network uses its own leasefile, so there is sufficient space for all configured addresses to be allocated.- -With this release of libvirt, each virtual network uses its own leasefile, so there are exactly enough slots in the leasefiles to allow all configured addresses to be allocated.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0596.html