Commit 7bbddc50 authored by Kristoffer Larsen's avatar Kristoffer Larsen Committed by Tomek Mrugalski

Add log message containing classes during allocation failure

parent e5cbe8ec
......@@ -254,7 +254,7 @@ messages: alloc_engine_messages.h alloc_engine_messages.cc \
@echo Message files regenerated
alloc_engine_messages.h alloc_engine_messages.cc: alloc_engine_messages.mes
$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes
dhcpsrv_messages.h dhcpsrv_messages.cc: dhcpsrv_messages.mes
$(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes
......
......@@ -3964,6 +3964,13 @@ AllocEngine::allocateUnreservedLease4(ClientContext4& ctx) {
.arg(ctx.query_->getLabel())
.arg(total_attempts);
const ClientClasses& classes = ctx.query_->getClasses();
if (!classes.empty()) {
LOG_WARN(alloc_engine_logger, ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES)
.arg(ctx.query_->getLabel())
.arg(classes.toText());
}
return (new_lease);
}
......
......@@ -40,6 +40,8 @@ consider reducing the lease lifetime. In this way, addresses allocated
to clients that are no longer active on the network will become available
sooner.
% ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES %1: Failed to allocate an IPv4 address for client with classes: %2
% ALLOC_ENGINE_V4_DECLINED_RECOVERED IPv4 address %1 was recovered after %2 seconds of probation-period
This informational message indicates that the specified address was reported
as duplicate (client sent DECLINE) and the server marked this address as
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment