RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 687551 - Defining multiple libvirt networks causes dnsmasq to hit DHCP lease max prematurely
Summary: Defining multiple libvirt networks causes dnsmasq to hit DHCP lease max prema...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-15 15:08 UTC by Laine Stump
Modified: 2015-09-28 02:08 UTC (History)
5 users (show)

Fixed In Version: libvirt-0.8.7-13.el6
Doc Type: Bug Fix
Doc Text:
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.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:29:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0596 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-05-18 17:56:36 UTC

Description Laine Stump 2011-03-15 15:08:23 UTC
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

Comment 2 Laine Stump 2011-03-15 15:47:03 UTC
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

Comment 3 Laine Stump 2011-03-15 17:18:26 UTC
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

Comment 6 Laine Stump 2011-05-03 18:10:20 UTC
    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.

Comment 9 Laura Bailey 2011-05-04 02:38:45 UTC
    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.

Comment 10 errata-xmlrpc 2011-05-19 13:29:04 UTC
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


Note You need to log in before you can comment on or make changes to this bug.