2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[#2276] Add TIMEOUT log messages to new classes

/src/bin/d2/check_exists_add.cc
/src/bin/d2/check_exists_remove.cc
/src/bin/d2/simple_add_without_dhcid.cc
/src/bin/d2/simple_remove_without_dhcid.cc
This commit is contained in:
Thomas Markwalder
2023-06-06 10:53:43 -04:00
parent 1dcec4a98f
commit 60f78b98da
4 changed files with 110 additions and 23 deletions

View File

@@ -234,11 +234,19 @@ CheckExistsAddTransaction::addingFwdAddrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
retryTransition(SELECTING_FWD_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
@@ -348,11 +356,19 @@ CheckExistsAddTransaction::replacingFwdAddrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
retryTransition(SELECTING_FWD_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REPLACE_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
@@ -484,11 +500,19 @@ CheckExistsAddTransaction::replacingRevPtrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
retryTransition(SELECTING_REV_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())

View File

@@ -231,11 +231,19 @@ CheckExistsRemoveTransaction::removingFwdAddrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_ADDRS_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
retryTransition(SELECTING_FWD_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_ADDRS_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
@@ -348,12 +356,9 @@ CheckExistsRemoveTransaction::removingFwdRRsHandler() {
}
case DNSClient::TIMEOUT:
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// No response from the server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_RRS_IO_ERROR)
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_RRS_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
@@ -369,6 +374,18 @@ CheckExistsRemoveTransaction::removingFwdRRsHandler() {
retryTransition(PROCESS_TRANS_FAILED_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_RRS_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
// @note same commentary as in TIMEOUT above case.
retryTransition(PROCESS_TRANS_FAILED_ST);
break;
case DNSClient::INVALID_RESPONSE:
// A response was received but was corrupt. Retry it like an IO
// error.
@@ -496,11 +513,21 @@ CheckExistsRemoveTransaction::removingRevPtrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REMOVE_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
// If we are out of retries on this server, we go back and start
// all over on a new server.
retryTransition(SELECTING_REV_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REMOVE_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())

View File

@@ -223,11 +223,19 @@ SimpleAddWithoutDHCIDTransaction::replacingFwdAddrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
retryTransition(SELECTING_FWD_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_ADD_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
@@ -354,11 +362,21 @@ SimpleAddWithoutDHCIDTransaction::replacingRevPtrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
// If we are out of retries on this server, we go back and start
// all over on a new server.
retryTransition(SELECTING_REV_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REPLACE_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())

View File

@@ -235,11 +235,19 @@ SimpleRemoveWithoutDHCIDTransaction::removingFwdRRsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_RRS_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
retryTransition(SELECTING_FWD_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_FORWARD_REMOVE_RRS_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
@@ -373,11 +381,21 @@ SimpleRemoveWithoutDHCIDTransaction::removingRevPtrsHandler() {
}
case DNSClient::TIMEOUT:
// No response from the server, log it and set up
// to select the next server for a retry.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REMOVE_TIMEOUT)
.arg(getRequestId())
.arg(getNcr()->getFqdn())
.arg(getCurrentServer()->toText());
// If we are out of retries on this server, we go back and start
// all over on a new server.
retryTransition(SELECTING_REV_SERVER_ST);
break;
case DNSClient::OTHER:
// We couldn't send to the current server, log it and set up
// to select the next server for a retry.
// @note For now we treat OTHER as an IO error like TIMEOUT. It
// is not entirely clear if this is accurate.
LOG_ERROR(d2_to_dns_logger, DHCP_DDNS_REVERSE_REMOVE_IO_ERROR)
.arg(getRequestId())
.arg(getNcr()->getFqdn())