mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[904-add-ability-to-force-a-cb-update-remotely] Addressed comments but still command to update
This commit is contained in:
@@ -5891,9 +5891,10 @@ server's performance, because the server needs to make at least one query
|
||||
to the database to discover the pending configuration updates. The
|
||||
default value of the ``config-fetch-wait-time`` is 30 seconds.
|
||||
|
||||
To trigger an immediate polling the ``server-update`` command is
|
||||
available for both DHCPv4 and DHCPv6 servers since the 1.7.1 Kea
|
||||
release.
|
||||
The ``server-update`` command can be used to force the server to
|
||||
immediately poll the configuration changes from the database and avoid
|
||||
waiting for the next fetch cycle. The command was added in 1.7.1 Kea
|
||||
release for DHCPv4 and DHCPv6 servers.
|
||||
|
||||
Finally, in the configuration example above, two hooks libraries are
|
||||
loaded. The first, ``libdhcp_mysql_cb.so``, is the implementation of
|
||||
|
@@ -565,6 +565,7 @@ ControlledDhcpv4Srv::commandServerUpdateHandler(const std::string&,
|
||||
server_->getCBControl()->databaseConfigFetch(srv_cfg, mode);
|
||||
} catch (const std::exception& ex) {
|
||||
LOG_ERROR(dhcp4_logger, DHCP4_CB_FETCH_UPDATES_FAIL)
|
||||
.arg("server-update command")
|
||||
.arg(ex.what());
|
||||
return (createAnswer(CONTROL_RESULT_ERROR,
|
||||
"Server update failed: " + string(ex.what())));
|
||||
@@ -1077,6 +1078,7 @@ ControlledDhcpv4Srv::cbFetchUpdates(const SrvConfigPtr& srv_cfg,
|
||||
|
||||
} catch (const std::exception& ex) {
|
||||
LOG_ERROR(dhcp4_logger, DHCP4_CB_FETCH_UPDATES_FAIL)
|
||||
.arg("periodic poll")
|
||||
.arg(ex.what());
|
||||
|
||||
// We allow at most 10 consecutive failures after which we stop
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Wed Jul 10 2019 15:10
|
||||
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Fri Oct 25 2019 16:40
|
||||
|
||||
#include <cstddef>
|
||||
#include <log/message_types.h>
|
||||
@@ -150,7 +150,7 @@ const char* values[] = {
|
||||
"DHCP4_BUFFER_RECEIVE_FAIL", "error on attempt to receive packet: %1",
|
||||
"DHCP4_BUFFER_UNPACK", "parsing buffer received from %1 to %2 over interface %3",
|
||||
"DHCP4_BUFFER_WAIT_SIGNAL", "signal received while waiting for next packet, next waiting signal is %1",
|
||||
"DHCP4_CB_FETCH_UPDATES_FAIL", "error on attempt to fetch configuration updates from the configuration backend(s): %1",
|
||||
"DHCP4_CB_FETCH_UPDATES_FAIL", "error on attempt to fetch configuration updates from the configuration backend(s) for %1: %2",
|
||||
"DHCP4_CB_FETCH_UPDATES_RETRIES_EXHAUSTED", "maximum number of configuration fetch attempts: 10, has been exhausted without success",
|
||||
"DHCP4_CLASS_ASSIGNED", "%1: client packet has been assigned to the following class(es): %2",
|
||||
"DHCP4_CLASS_UNCONFIGURED", "%1: client packet belongs to an unconfigured class: %2",
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Wed Jul 10 2019 15:10
|
||||
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on Fri Oct 25 2019 16:40
|
||||
|
||||
#ifndef DHCP4_MESSAGES_H
|
||||
#define DHCP4_MESSAGES_H
|
||||
|
@@ -46,12 +46,14 @@ by the process. The signal will be handled before the server starts
|
||||
waiting for next packets. The argument specifies the next signal to
|
||||
be handled by the server.
|
||||
|
||||
% DHCP4_CB_FETCH_UPDATES_FAIL error on attempt to fetch configuration updates from the configuration backend(s): %1
|
||||
% DHCP4_CB_FETCH_UPDATES_FAIL error on attempt to fetch configuration updates from the configuration backend(s) for %1: %2
|
||||
This error message is issued when the server attempted to fetch
|
||||
configuration updates from the database and this attempt failed.
|
||||
The server will re-try according to the configured value of the
|
||||
config-fetch-wait-time parameter. The sole argument contains the
|
||||
reason for failure.
|
||||
If the error happens during periodic poll, the server will re-try
|
||||
according to the configured value of the config-fetch-wait-time
|
||||
parameter. The arguments contain the fetch context, i.e. during
|
||||
periodic poll or by the server-update command, and the reason for
|
||||
failure.
|
||||
|
||||
% DHCP4_CB_FETCH_UPDATES_RETRIES_EXHAUSTED maximum number of configuration fetch attempts: 10, has been exhausted without success
|
||||
This error indicates that the server has made a number of unsuccessful
|
||||
|
@@ -565,6 +565,7 @@ ControlledDhcpv6Srv::commandServerUpdateHandler(const std::string&,
|
||||
server_->getCBControl()->databaseConfigFetch(srv_cfg, mode);
|
||||
} catch (const std::exception& ex) {
|
||||
LOG_ERROR(dhcp6_logger, DHCP6_CB_FETCH_UPDATES_FAIL)
|
||||
.arg("server-update command")
|
||||
.arg(ex.what());
|
||||
return (createAnswer(CONTROL_RESULT_ERROR,
|
||||
"Server update failed: " + string(ex.what())));
|
||||
@@ -1095,6 +1096,7 @@ ControlledDhcpv6Srv::cbFetchUpdates(const SrvConfigPtr& srv_cfg,
|
||||
|
||||
} catch (const std::exception& ex) {
|
||||
LOG_ERROR(dhcp6_logger, DHCP6_CB_FETCH_UPDATES_FAIL)
|
||||
.arg("periodic poll")
|
||||
.arg(ex.what());
|
||||
|
||||
// We allow at most 10 consecutive failures after which we stop
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Tue Jul 16 2019 11:03
|
||||
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Fri Oct 25 2019 16:41
|
||||
|
||||
#include <cstddef>
|
||||
#include <log/message_types.h>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Tue Jul 16 2019 11:03
|
||||
// File created from ../../../src/bin/dhcp6/dhcp6_messages.mes on Fri Oct 25 2019 16:41
|
||||
|
||||
#ifndef DHCP6_MESSAGES_H
|
||||
#define DHCP6_MESSAGES_H
|
||||
|
@@ -56,9 +56,11 @@ be handled by the server.
|
||||
% DHCP6_CB_FETCH_UPDATES_FAIL error on attempt to fetch configuration updates from the configuration backend(s): %1
|
||||
This error message is issued when the server attempted to fetch
|
||||
configuration updates from the database and this attempt failed.
|
||||
The server will re-try according to the configured value of the
|
||||
config-fetch-wait-time parameter. The sole argument contains the
|
||||
reason for failure.
|
||||
If the error happens during periodic poll, the server will re-try
|
||||
according to the configured value of the config-fetch-wait-time
|
||||
parameter. The arguments contain the fetch context, i.e. during
|
||||
periodic poll or by the server-update command, and the reason for
|
||||
failure.
|
||||
|
||||
% DHCP6_CB_FETCH_UPDATES_RETRIES_EXHAUSTED maximum number of configuration fetch attempts: 10, has been exhausted without success
|
||||
This error indicates that the server has made a number of unsuccessful
|
||||
|
Reference in New Issue
Block a user