diff --git a/src/bin/d2/check_exists_add.cc b/src/bin/d2/check_exists_add.cc index 0353fb2316..dade71eeed 100644 --- a/src/bin/d2/check_exists_add.cc +++ b/src/bin/d2/check_exists_add.cc @@ -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()) diff --git a/src/bin/d2/check_exists_remove.cc b/src/bin/d2/check_exists_remove.cc index 87b9fa0d20..10d4566c71 100644 --- a/src/bin/d2/check_exists_remove.cc +++ b/src/bin/d2/check_exists_remove.cc @@ -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()) diff --git a/src/bin/d2/simple_add_without_dhcid.cc b/src/bin/d2/simple_add_without_dhcid.cc index d204ed5e52..bec84a1558 100644 --- a/src/bin/d2/simple_add_without_dhcid.cc +++ b/src/bin/d2/simple_add_without_dhcid.cc @@ -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()) diff --git a/src/bin/d2/simple_remove_without_dhcid.cc b/src/bin/d2/simple_remove_without_dhcid.cc index fd0c58f34a..d96939b558 100644 --- a/src/bin/d2/simple_remove_without_dhcid.cc +++ b/src/bin/d2/simple_remove_without_dhcid.cc @@ -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())