[Kea-users] Need help assigning subnets by class with host reservations
MRob
mrobti at insiberia.net
Tue Nov 15 16:16:01 UTC 2016
On 2016-11-15 07:54, MRob wrote:
> On 2016-11-15 04:51, Thomas Markwalder wrote:
>> On 11/15/16 7:41 AM, Thomas Markwalder wrote:
>>
>> Sorry, it would need to be at least this:
>>
>> diff --git a/src/lib/dhcpsrv/alloc_engine.cc
>> b/src/lib/dhcpsrv/alloc_engine.cc
>> index bc37eeb..0a5e446 100644
>> --- a/src/lib/dhcpsrv/alloc_engine.cc
>> +++ b/src/lib/dhcpsrv/alloc_engine.cc
>> @@ -2841,6 +2841,11 @@
>> AllocEngine::allocateUnreservedLease4(ClientContext4& ctx) {
>> new_lease = allocateOrReuseLease4(candidate, ctx);
>> if (new_lease) {
>> return (new_lease);
>> + } else {
>> + if (ctx.callout_handle_ &&
>
> You need to remove the opening brace on the next line (or add a closing
> one).
>
>> + ctx.callout_handle_->getStatus() ==
>> CalloutHandle::NEXT_STEP_SKIP) {
>> + break;
>> + }
>> }
>> }
>> }
>
> Initial testing shows this seems to fix the problem. Thank you for the
> quick patch.
Though this is what gets logged:
WARN [kea-dhcp4.alloc-engine] ALLOC_ENGINE_V4_ALLOC_FAIL [hwtype=1
aa:bb:cc:dd:ee:ff], cid=[01:aa:bb:cc:dd:ee:ff], tid=0x4a35b190: failed
to allocate an IPv4 address after 151 attempt(s)
My reading of the log is that this is logged after only a single lease
request, so I think it's just an assumption in the code about why the
lease failed.
More information about the Kea-users
mailing list