diff options
author | Piotrek Zadroga <piotrek@isc.org> | 2024-04-22 17:58:32 +0200 |
---|---|---|
committer | Piotrek Zadroga <piotrek@isc.org> | 2024-04-26 14:42:46 +0200 |
commit | 45e6ea1ed873f635fcc74b9c4519d32f468e2b0c (patch) | |
tree | 5ca8965692aa6f99bd2d667c4bec5eee87f79351 | |
parent | [#3344] Addressed review comments (doc) (diff) | |
download | kea-45e6ea1ed873f635fcc74b9c4519d32f468e2b0c.tar.xz kea-45e6ea1ed873f635fcc74b9c4519d32f468e2b0c.zip |
[#2820] add tid in some alloc-engine logs
-rw-r--r-- | src/lib/dhcpsrv/alloc_engine.cc | 6 | ||||
-rw-r--r-- | src/lib/dhcpsrv/alloc_engine_messages.cc | 12 | ||||
-rw-r--r-- | src/lib/dhcpsrv/alloc_engine_messages.mes | 12 |
3 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/dhcpsrv/alloc_engine.cc b/src/lib/dhcpsrv/alloc_engine.cc index f963df97f4..38d47d9312 100644 --- a/src/lib/dhcpsrv/alloc_engine.cc +++ b/src/lib/dhcpsrv/alloc_engine.cc @@ -1390,6 +1390,7 @@ AllocEngine::allocateGlobalReservedLeases6(ClientContext6& ctx, if (!valid_subnet) { LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE, ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6) + .arg(ctx.query_->getLabel()) .arg(addr.toText()) .arg(labelNetworkOrSubnet(ctx.subnet_)); continue; @@ -1499,11 +1500,13 @@ AllocEngine::removeNonmatchingReservedLeases6(ClientContext6& ctx, if (hosts.size() == 1) { if (ctx.currentIA().type_ == Lease::TYPE_NA) { LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE) + .arg(ctx.query_->getLabel()) .arg(candidate->addr_.toText()) .arg(ctx.duid_->toText()) .arg(hosts.front()->getIdentifierAsText()); } else { LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE) + .arg(ctx.query_->toText()) .arg(candidate->addr_.toText()) .arg(static_cast<int>(candidate->prefixlen_)) .arg(ctx.duid_->toText()) @@ -1512,11 +1515,13 @@ AllocEngine::removeNonmatchingReservedLeases6(ClientContext6& ctx, } else { if (ctx.currentIA().type_ == Lease::TYPE_NA) { LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE) + .arg(ctx.query_->getLabel()) .arg(candidate->addr_.toText()) .arg(ctx.duid_->toText()) .arg(hosts.size()); } else { LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE) + .arg(ctx.query_->getLabel()) .arg(candidate->addr_.toText()) .arg(static_cast<int>(candidate->prefixlen_)) .arg(ctx.duid_->toText()) @@ -3453,6 +3458,7 @@ hasAddressReservation(AllocEngine::ClientContext4& ctx) { if (global_host_address != IOAddress::IPV4_ZERO_ADDRESS()) { LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE, ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS) + .arg(ctx.query_->getLabel()) .arg(ctx.currentHost()->getIPv4Reservation().toText()) .arg(AllocEngine::labelNetworkOrSubnet(ctx.subnet_)); } diff --git a/src/lib/dhcpsrv/alloc_engine_messages.cc b/src/lib/dhcpsrv/alloc_engine_messages.cc index 060dcfe759..d74155c27e 100644 --- a/src/lib/dhcpsrv/alloc_engine_messages.cc +++ b/src/lib/dhcpsrv/alloc_engine_messages.cc @@ -93,8 +93,8 @@ extern const isc::log::MessageID ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE = " namespace { const char* values[] = { - "ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS", "ignoring globally reserved address %1, it falls outside %2", - "ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6", "ignoring globally reserved address %1, it falls outside %2", + "ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS", "%1: ignoring globally reserved address %2, it falls outside %3", + "ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6", "%1: ignoring globally reserved address %2, it falls outside %3", "ALLOC_ENGINE_LEASE_RECLAIMED", "successfully reclaimed lease %1", "ALLOC_ENGINE_REMOVAL_NCR_FAILED", "sending removal name change request failed for lease %1: %2", "ALLOC_ENGINE_V4_ALLOC_ERROR", "%1: error during attempt to allocate an IPv4 address: %2", @@ -168,10 +168,10 @@ const char* values[] = { "ALLOC_ENGINE_V6_RENEW_REMOVE_RESERVED", "%1: checking if existing client's leases are reserved for another client", "ALLOC_ENGINE_V6_RENEW_REMOVE_UNRESERVED", "dynamically allocating leases for the renewing client %1", "ALLOC_ENGINE_V6_REUSE_EXPIRED_LEASE_DATA", "%1: reusing expired lease, updated lease information: %2", - "ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE", "address %1 was revoked from client %2 as it is reserved for client %3", - "ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE", "prefix %1/%2 was revoked from client %3 as it is reserved for client %4", - "ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE", "address %1 was revoked from client %2 as it is reserved for %3 other clients", - "ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE", "prefix %1/%2 was revoked from client %3 as it is reserved for %4 other clients", + "ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE", "%1: address %2 was revoked from client %3 as it is reserved for client %4", + "ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE", "%1: prefix %2/%3 was revoked from client %4 as it is reserved for client %5", + "ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE", "%1: address %2 was revoked from client %3 as it is reserved for %4 other clients", + "ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE", "%1: prefix %2/%3 was revoked from client %4 as it is reserved for %5 other clients", NULL }; diff --git a/src/lib/dhcpsrv/alloc_engine_messages.mes b/src/lib/dhcpsrv/alloc_engine_messages.mes index f6a50a2ec9..c777b27c8c 100644 --- a/src/lib/dhcpsrv/alloc_engine_messages.mes +++ b/src/lib/dhcpsrv/alloc_engine_messages.mes @@ -6,13 +6,13 @@ $NAMESPACE isc::dhcp -% ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS ignoring globally reserved address %1, it falls outside %2 +% ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS %1: ignoring globally reserved address %2, it falls outside %3 This debug message is issued when the allocation engine determines that the globally reserved address falls outside the selected subnet or shared-network. The server should ignore the reserved address and attempt a dynamic allocation. -% ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6 ignoring globally reserved address %1, it falls outside %2 +% ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6 %1: ignoring globally reserved address %2, it falls outside %3 This debug message is issued when the allocation engine determines that the globally reserved address falls outside the selected subnet or shared-network. The server should ignore the reserved address and @@ -588,7 +588,7 @@ an existing lease. The details of the updated lease are printed. The first argument includes the client identification information. -% ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE address %1 was revoked from client %2 as it is reserved for client %3 +% ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE %1: address %2 was revoked from client %3 as it is reserved for client %4 This informational message is an indication that the specified IPv6 address was used by client A but it is now reserved for client B. Client A has been told to stop using it so that it can be leased to client B. @@ -597,7 +597,7 @@ in cases such as the system administrator adding a reservation for an address that is currently in use by another client. The server will fully recover from this situation, but clients will change their addresses. -% ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE prefix %1/%2 was revoked from client %3 as it is reserved for client %4 +% ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE %1: prefix %2/%3 was revoked from client %4 as it is reserved for client %5 This informational message is an indication that the specified IPv6 prefix was used by client A but it is now reserved for client B. Client A has been told to stop using it so that it can be leased to client B. @@ -606,7 +606,7 @@ in cases such as the system administrator adding a reservation for an address that is currently in use by another client. The server will fully recover from this situation, but clients will change their prefixes. -% ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE address %1 was revoked from client %2 as it is reserved for %3 other clients +% ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE %1: address %2 was revoked from client %3 as it is reserved for %4 other clients This informational message is an indication that the specified IPv6 address was used by client A but it is now reserved for multiple other clients. Client A has been told to stop using it so that it can be @@ -616,7 +616,7 @@ such as the system administrator adding reservations for an address that is currently in use by another client. The server will fully recover from this situation, but clients will change their addresses. -% ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE prefix %1/%2 was revoked from client %3 as it is reserved for %4 other clients +% ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE %1: prefix %2/%3 was revoked from client %4 as it is reserved for %5 other clients This informational message is an indication that the specified IPv6 prefix was used by client A but it is now reserved for multiple other clients. Client A has been told to stop using it so that it can be |