2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-29 13:07:50 +00:00

[#2820] add tid in some alloc-engine logs

This commit is contained in:
Piotrek Zadroga 2024-04-22 17:58:32 +02:00
parent a22f697531
commit 45e6ea1ed8
3 changed files with 18 additions and 12 deletions

View File

@ -1390,6 +1390,7 @@ AllocEngine::allocateGlobalReservedLeases6(ClientContext6& ctx,
if (!valid_subnet) { if (!valid_subnet) {
LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE, LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE,
ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6) ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS6)
.arg(ctx.query_->getLabel())
.arg(addr.toText()) .arg(addr.toText())
.arg(labelNetworkOrSubnet(ctx.subnet_)); .arg(labelNetworkOrSubnet(ctx.subnet_));
continue; continue;
@ -1499,11 +1500,13 @@ AllocEngine::removeNonmatchingReservedLeases6(ClientContext6& ctx,
if (hosts.size() == 1) { if (hosts.size() == 1) {
if (ctx.currentIA().type_ == Lease::TYPE_NA) { if (ctx.currentIA().type_ == Lease::TYPE_NA) {
LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE) LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_ADDR_LEASE)
.arg(ctx.query_->getLabel())
.arg(candidate->addr_.toText()) .arg(candidate->addr_.toText())
.arg(ctx.duid_->toText()) .arg(ctx.duid_->toText())
.arg(hosts.front()->getIdentifierAsText()); .arg(hosts.front()->getIdentifierAsText());
} else { } else {
LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE) LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_PREFIX_LEASE)
.arg(ctx.query_->toText())
.arg(candidate->addr_.toText()) .arg(candidate->addr_.toText())
.arg(static_cast<int>(candidate->prefixlen_)) .arg(static_cast<int>(candidate->prefixlen_))
.arg(ctx.duid_->toText()) .arg(ctx.duid_->toText())
@ -1512,11 +1515,13 @@ AllocEngine::removeNonmatchingReservedLeases6(ClientContext6& ctx,
} else { } else {
if (ctx.currentIA().type_ == Lease::TYPE_NA) { if (ctx.currentIA().type_ == Lease::TYPE_NA) {
LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE) LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_SHARED_ADDR_LEASE)
.arg(ctx.query_->getLabel())
.arg(candidate->addr_.toText()) .arg(candidate->addr_.toText())
.arg(ctx.duid_->toText()) .arg(ctx.duid_->toText())
.arg(hosts.size()); .arg(hosts.size());
} else { } else {
LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE) LOG_INFO(alloc_engine_logger, ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE)
.arg(ctx.query_->getLabel())
.arg(candidate->addr_.toText()) .arg(candidate->addr_.toText())
.arg(static_cast<int>(candidate->prefixlen_)) .arg(static_cast<int>(candidate->prefixlen_))
.arg(ctx.duid_->toText()) .arg(ctx.duid_->toText())
@ -3453,6 +3458,7 @@ hasAddressReservation(AllocEngine::ClientContext4& ctx) {
if (global_host_address != IOAddress::IPV4_ZERO_ADDRESS()) { if (global_host_address != IOAddress::IPV4_ZERO_ADDRESS()) {
LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE, LOG_DEBUG(alloc_engine_logger, ALLOC_ENGINE_DBG_TRACE,
ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS) ALLOC_ENGINE_IGNORING_UNSUITABLE_GLOBAL_ADDRESS)
.arg(ctx.query_->getLabel())
.arg(ctx.currentHost()->getIPv4Reservation().toText()) .arg(ctx.currentHost()->getIPv4Reservation().toText())
.arg(AllocEngine::labelNetworkOrSubnet(ctx.subnet_)); .arg(AllocEngine::labelNetworkOrSubnet(ctx.subnet_));
} }

View File

@ -93,8 +93,8 @@ extern const isc::log::MessageID ALLOC_ENGINE_V6_REVOKED_SHARED_PREFIX_LEASE = "
namespace { namespace {
const char* values[] = { const char* values[] = {
"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",
"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",
"ALLOC_ENGINE_LEASE_RECLAIMED", "successfully reclaimed lease %1", "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_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", "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_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_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_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_ADDR_LEASE", "%1: address %2 was revoked from client %3 as it is reserved for client %4",
"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",
"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",
"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",
NULL NULL
}; };

View File

@ -6,13 +6,13 @@
$NAMESPACE isc::dhcp $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 This debug message is issued when the allocation engine determines that
the globally reserved address falls outside the selected subnet or the globally reserved address falls outside the selected subnet or
shared-network. The server should ignore the reserved address and shared-network. The server should ignore the reserved address and
attempt a dynamic allocation. 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 This debug message is issued when the allocation engine determines that
the globally reserved address falls outside the selected subnet or the globally reserved address falls outside the selected subnet or
shared-network. The server should ignore the reserved address and 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 printed. The first argument includes the client identification
information. 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 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 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. 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 address that is currently in use by another client. The server will fully
recover from this situation, but clients will change their addresses. 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 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 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. 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 address that is currently in use by another client. The server will fully
recover from this situation, but clients will change their prefixes. 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 This informational message is an indication that the specified IPv6
address was used by client A but it is now reserved for multiple other 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 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 that is currently in use by another client. The server will fully
recover from this situation, but clients will change their addresses. 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 This informational message is an indication that the specified IPv6
prefix was used by client A but it is now reserved for multiple other 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 clients. Client A has been told to stop using it so that it can be