Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
445
Issues
445
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
Kea
Commits
a4b9f16a
Commit
a4b9f16a
authored
Oct 25, 2019
by
Francis Dupont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[904-add-ability-to-force-a-cb-update-remotely] Addressed comments but still command to update
parent
9fe0906d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
15 deletions
+24
-15
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp4-srv.rst
+4
-3
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/ctrl_dhcp4_srv.cc
+2
-0
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.cc
+2
-2
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.h
+1
-1
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp4/dhcp4_messages.mes
+6
-4
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/ctrl_dhcp6_srv.cc
+2
-0
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.cc
+1
-1
src/bin/dhcp6/dhcp6_messages.h
src/bin/dhcp6/dhcp6_messages.h
+1
-1
src/bin/dhcp6/dhcp6_messages.mes
src/bin/dhcp6/dhcp6_messages.mes
+5
-3
No files found.
doc/sphinx/arm/dhcp4-srv.rst
View file @
a4b9f16a
...
...
@@ -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
...
...
src/bin/dhcp4/ctrl_dhcp4_srv.cc
View file @
a4b9f16a
...
...
@@ -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
...
...
src/bin/dhcp4/dhcp4_messages.cc
View file @
a4b9f16a
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on
Wed Jul 10 2019 15:1
0
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on
Fri Oct 25 2019 16:4
0
#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"
,
...
...
src/bin/dhcp4/dhcp4_messages.h
View file @
a4b9f16a
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on
Wed Jul 10 2019 15:1
0
// File created from ../../../src/bin/dhcp4/dhcp4_messages.mes on
Fri Oct 25 2019 16:4
0
#ifndef DHCP4_MESSAGES_H
#define DHCP4_MESSAGES_H
...
...
src/bin/dhcp4/dhcp4_messages.mes
View file @
a4b9f16a
...
...
@@ -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
...
...
src/bin/dhcp6/ctrl_dhcp6_srv.cc
View file @
a4b9f16a
...
...
@@ -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
...
...
src/bin/dhcp6/dhcp6_messages.cc
View file @
a4b9f16a
// 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>
...
...
src/bin/dhcp6/dhcp6_messages.h
View file @
a4b9f16a
// 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
...
...
src/bin/dhcp6/dhcp6_messages.mes
View file @
a4b9f16a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment