pre-creating reserved leases

Foggi, Nicola NFOGGI at depaul.edu
Thu Mar 26 22:14:05 UTC 2009


So I've opened up BUG #19439, but definitely ran into the state of it
being 'released' today and not allocating the lease.  It doesn't seem to
be who is set as primary/secondary as I found today, the primary
wouldn't allocate the proper lease (as updated in the bug).  

Or maybe it's related to the "bind update on xxx from xx rejected:
incoming update is less critical than outgoing update" message I'm
seeing on my secondary, maybe who owns the lease is getting lost.

Definitely some bugs in lease_mine_to_reallocate and it's handling of
"RESERVED" leases, so hopefully my bug report helps, not sure if it's
proper as I mentioned in the report :(

Nicola 

-----Original Message-----
From: dhcp-users-bounces at lists.isc.org
[mailto:dhcp-users-bounces at lists.isc.org] On Behalf Of David W. Hankins
Sent: Wednesday, March 04, 2009 11:47 AM
To: Users of ISC DHCP
Subject: Re: pre-creating reserved leases

On Tue, Mar 03, 2009 at 08:58:49PM -0600, Foggi, Nicola wrote:
> dhcpdiscover comes in and executes find_lease, log message written, if
failover is defined (is in my case) it checks the lease to determine if
it's the right one to allocate where the binding state must be
"FTS_ACTIVE" or lease_mine_to_reallocate passes.  So here might be the
problem, the lease is in a "FREE" binding state.

Then this must be the primary.  Reserved leases act a little different.
A primary should record it as free, the secondary should record it as
backup, when they process the bndupd or bndack from the peer with the
reserved flag set.

So lease_mine_to_reallocate() should succeed on an inactive lease, no
matter primary or secondary, so it sounds like you're looking at a bug
either inside that function, or earlier in processing where the lease's
state is set.

There are some other corner cases I'm wondering about now; if the
secondary believed the lease was 'expired' or 'released' at that
particular instant, it wouldn't think the lease was available for
allocation.  Probably we do want to check the reserved flag in the
find_lease() function.

-- 
David W. Hankins	"If you don't do it right the first time,
Software Engineer		     you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins



More information about the dhcp-users mailing list