Bug 445457 - dhcp reclaims abandoned leases when free leases are available
dhcp reclaims abandoned leases when free leases are available
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dhcp (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: David Cantrell
Release Test Team
Depends On:
  Show dependency treegraph
Reported: 2008-05-06 18:06 EDT by Bryan Mason
Modified: 2009-05-18 16:06 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-18 16:06:27 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed patch (5.81 KB, patch)
2008-05-06 18:06 EDT, Bryan Mason
no flags Details | Diff

  None (edit)
Description Bryan Mason 2008-05-06 18:06:20 EDT
Description of problem:

    A DHCP client (usually a Windows client) cannot be assigned an IP
    address.  The following messages appear in the syslog:

        dhcpd: Reclaiming abandoned IP address

        dhcpd: DHCPDISCOVER from 00:16:d4:2f:a5:b0 via eth0

        dhcpd: DHCPOFFER on to 00:16:d4:2f:a5:b0 (Notebook1) 
        via eth0

        dhcpd: DHCPREQUEST for ( from 
        00:16:d4:2f:a5:b0 (Notebook1) via eth0

        dhcpd: DHCPACK on to 00:16:d4:2f:a5:b0 (Notebook1) 
        via eth0

        dhcpd: Abandoning IP address declined.

        dhcpd: DHCPDECLINE of from 00:16:d4:2f:a5:b0
        (Notebook1) via eth0: not found

    It appears that dhcp is trying to re-use an abandoned IP address.
    According to the DHCP 3.0.6 Release Notes[1], this appears to be
    fixed in dhcp-3.0.2:

        Changes since 3.0.2rc1

        * allocate_lease() was rewritten to repair a bug in which the
          server would try to allocate an ABANDONED lease when FREE
          leases were available.

Version-Release number of selected component (if applicable):


How reproducible:

    Not reproducible, but happens often.  Current workaround is to
    delete the leases file and restart dhcpd service.  Seems to happen
    more quickly with Windows clients.

Steps to Reproduce:

    1.  Let dhcp server run for a while with Windows DHCP clients.  

Actual results:

     Eventually a client will end up in a state where it can't get an
     IP address.

Expected results:

    dhcp server assigns addresses without the need to restart the service.

Additional info:

    Possible patch attached.  Patch was generated by running a diff
    between dhcp-3.0.2rc2 and dhcp-3.0.2rc1.  The patch applies cleanly
    to RHEL 4.6 (dhcp-3.0.1-59.EL4), but test results aren't available

Comment 1 Bryan Mason 2008-05-06 18:06:20 EDT
Created attachment 304691 [details]
Proposed patch
Comment 3 David Cantrell 2008-09-25 23:33:49 EDT
Patch available, which pulls in the changes for allocate_leases() post 3.0.1.  Seems reasonable enough to fix (and easy enough).
Comment 6 David Cantrell 2008-10-08 21:41:45 EDT
Sounds good, Ben.  Thanks.
Comment 7 David Cantrell 2008-10-08 21:55:32 EDT
Patch applied.  Fix will be in dhcp-3.0.1-63.EL4.
Comment 9 Alexander Todorov 2009-02-17 02:43:12 EST
are you able to test this issue with the latest rel-eng or nightly builds ?

Comment 11 Bryan Mason 2009-02-25 14:22:16 EST
(In reply to comment #9)
> Bryan,
> are you able to test this issue with the latest rel-eng or nightly builds ?

Unfortunately, I was never able to reproduce the problem (didn't have the right equipment).  I've asked the customer who originally reported the problem to provide feedback on some test packages that I gave them.  I'll forward whatever information I receive.
Comment 12 Alexander Todorov 2009-03-13 08:53:32 EDT
do you have any feedback from the customer? RTT can't test this. We don't have Windows machines to act as DHCP clients.
Comment 13 Alexander Todorov 2009-03-13 10:15:53 EDT
For the record:
Proposed patch is included in the srpm as dhcp-3.0.2-fix-allocate-lease.patch without any modifications and is being applied to the sources in the .spec file.
Comment 15 errata-xmlrpc 2009-05-18 16:06:27 EDT
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.


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