[kea-dev] duplicate leases error

Marcin Siodelski marcin at isc.org
Tue Oct 4 12:39:28 UTC 2016


On 04.08.2016 15:25, Jan Dvořák wrote:
> We are seeing "error during attempt to allocate an IPv4 address:
> multiple records were found in the database where only one was expected
> for query get_lease4_hwaddr_subid" errors for hosts after they come up
> the first time after network provisioning.
> 
> Basically, hosts get one lease for BIOS, second lease for the installer
> and when they come up finally, KEA refuses to give them either. For now,
> we have hacked this by a pre-INSERT trigger that removes any (subnet_id,
> hwaddr)-unique leases prior to inserting a new one.
> 
> Please advise.
> 
> 

Jan,

Many thanks for your message, which apparently got buried on the kea-dev
list, and has never been replied.

I see how that can be the case that the server refuses to allocate the
lease as a result of detecting that there is already more than one lease
associated with a given MAC address, and it is indeed wrong behavior of
the server.

I think this is what your description says, but I'd like to double check....

The BIOS shows up as a client-id0/hw-address identity. It gets the
lease. The installer shows up as client-id1/hw-address and gets the
lease just fine. The client-id0 is different than client-id1 and
hw-address is the same in both cases.

Finally, the host comes up as client-id2/hw-address and the server finds
that even though there is no lease for client-id2, there are two leases
for hw-address and it refuses to allocate the lease, i.e. sends DHCPNAK.

Is this correct?

Marcin Siodelski
ISC




More information about the kea-dev mailing list