2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 21:45:37 +00:00

[#1915] failure to allocate message is more verbose

This commit is contained in:
Tomek Mrugalski
2021-06-25 11:04:50 +02:00
committed by Razvan Becheriu
parent a0d04b2cc3
commit 4448a4ef75
3 changed files with 8 additions and 5 deletions

View File

@@ -4394,10 +4394,12 @@ AllocEngine::allocateUnreservedLease4(ClientContext4& ctx) {
} else {
// The client is not connected to a shared network. It is connected
// to a subnet. Let's log the ID of that subnet.
// to a subnet. Let's log some details about the subnet.
LOG_WARN(alloc_engine_logger, ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET)
.arg(ctx.query_->getLabel())
.arg(ctx.subnet_->getID());
.arg(ctx.subnet_->toText())
.arg(ctx.subnet_->getID())
.arg(ctx.subnet_->getSharedNetworkName());
}
if (total_attempts == 0) {
// In this case, it seems that none of the pools in the subnets could

View File

@@ -94,7 +94,7 @@ const char* values[] = {
"ALLOC_ENGINE_V4_ALLOC_FAIL_CLASSES", "%1: Failed to allocate an IPv4 address for client with classes: %2",
"ALLOC_ENGINE_V4_ALLOC_FAIL_NO_POOLS", "%1: no pools were available for the address allocation",
"ALLOC_ENGINE_V4_ALLOC_FAIL_SHARED_NETWORK", "%1: failed to allocate an IPv4 address in the shared network %2: %3 subnets have no available addresses, %4 subnets have no matching pools",
"ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET", "%1: failed to allocate an IPv4 address in the subnet with id %2",
"ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET", "%1: failed to allocate an IPv4 address in the subnet %2, subnet-id %3, shared network %4",
"ALLOC_ENGINE_V4_DECLINED_RECOVERED", "IPv4 address %1 was recovered after %2 seconds of probation-period",
"ALLOC_ENGINE_V4_DISCOVER_ADDRESS_CONFLICT", "%1: conflicting reservation for address %2 with existing lease %3",
"ALLOC_ENGINE_V4_DISCOVER_HR", "client %1 sending DHCPDISCOVER has reservation for the address %2",

View File

@@ -88,11 +88,12 @@ an operator can identify the situations when there are no addresses left
in some of the pools. He or she can also identify a client classification
misconfigurations causing some clients to be refused the service.
% ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET %1: failed to allocate an IPv4 address in the subnet with id %2
% ALLOC_ENGINE_V4_ALLOC_FAIL_SUBNET %1: failed to allocate an IPv4 address in the subnet %2, subnet-id %3, shared network %4
This warning message is issued when the allocation engine fails to allocate
a lease for a client connected to a subnet that does not belong to a shared
network. The first argument includes the client identification information.
The second argument specifies the subnet identifier.
The second and third arguments identify the subnet. The fourth argument
also specify the shared network, if the subnet belongs to a shared network.
There are many reasons for failing lease allocations. One of them may be the
address pools exhaustion or existing reservations for the free leases.