diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc index 2c5d96fc12..da354d8833 100644 --- a/src/lib/dhcpsrv/alloc_engine.cc +++ b/src/lib/dhcpsrv/alloc_engine.cc @@ -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 diff --git a/src/lib/dhcpsrv/alloc_engine_messages.cc b/src/lib/dhcpsrv/alloc_engine_messages.cc index f8753c9ffd..ba62fdf6ea 100644 --- a/src/lib/dhcpsrv/alloc_engine_messages.cc +++ b/src/lib/dhcpsrv/alloc_engine_messages.cc @@ -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", diff --git a/src/lib/dhcpsrv/alloc_engine_messages.mes b/src/lib/dhcpsrv/alloc_engine_messages.mes index 484aabd071..d0d0f5a5bd 100644 --- a/src/lib/dhcpsrv/alloc_engine_messages.mes +++ b/src/lib/dhcpsrv/alloc_engine_messages.mes @@ -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.