summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2021-08-05 16:21:11 +0200
committerRazvan Becheriu <razvan@isc.org>2021-08-09 22:33:09 +0200
commit23b69fe60968841ce00cbcbc9dabba52ee3cb0d5 (patch)
treea46beb150e3b59f9081bc36daf559cbf50f97fcc /src
parent[#2011] clean up comments (diff)
downloadkea-23b69fe60968841ce00cbcbc9dabba52ee3cb0d5.tar.xz
kea-23b69fe60968841ce00cbcbc9dabba52ee3cb0d5.zip
[#1893] added log message for config reload success
Diffstat (limited to 'src')
-rw-r--r--src/bin/dhcp4/ctrl_dhcp4_srv.cc4
-rw-r--r--src/bin/dhcp4/dhcp4_messages.cc2
-rw-r--r--src/bin/dhcp4/dhcp4_messages.h1
-rw-r--r--src/bin/dhcp4/dhcp4_messages.mes4
-rw-r--r--src/bin/dhcp6/ctrl_dhcp6_srv.cc4
-rw-r--r--src/bin/dhcp6/dhcp6_messages.cc2
-rw-r--r--src/bin/dhcp6/dhcp6_messages.h1
-rw-r--r--src/bin/dhcp6/dhcp6_messages.mes4
8 files changed, 20 insertions, 2 deletions
diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
index 5c04ba0c7b..2f43c2a530 100644
--- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc
+++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
@@ -257,7 +257,9 @@ ControlledDhcpv4Srv::commandConfigReloadHandler(const string&,
std::string file = ControlledDhcpv4Srv::getInstance()->getConfigFile();
try {
LOG_INFO(dhcp4_logger, DHCP4_DYNAMIC_RECONFIGURATION).arg(file);
- return (loadConfigFile(file));
+ auto result = loadConfigFile(file);
+ LOG_INFO(dhcp4_logger, DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS).arg(file);
+ return (result);
} catch (const std::exception& ex) {
// Log the unsuccessful reconfiguration. The reason for failure
// should be already logged. Don't rethrow an exception so as
diff --git a/src/bin/dhcp4/dhcp4_messages.cc b/src/bin/dhcp4/dhcp4_messages.cc
index ce259fc96e..6219337257 100644
--- a/src/bin/dhcp4/dhcp4_messages.cc
+++ b/src/bin/dhcp4/dhcp4_messages.cc
@@ -62,6 +62,7 @@ extern const isc::log::MessageID DHCP4_DHCP4O6_RECEIVING = "DHCP4_DHCP4O6_RECEIV
extern const isc::log::MessageID DHCP4_DHCP4O6_RESPONSE_DATA = "DHCP4_DHCP4O6_RESPONSE_DATA";
extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION = "DHCP4_DYNAMIC_RECONFIGURATION";
extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_FAIL = "DHCP4_DYNAMIC_RECONFIGURATION_FAIL";
+extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS = "DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS";
extern const isc::log::MessageID DHCP4_EMPTY_HOSTNAME = "DHCP4_EMPTY_HOSTNAME";
extern const isc::log::MessageID DHCP4_FLEX_ID = "DHCP4_FLEX_ID";
extern const isc::log::MessageID DHCP4_GENERATE_FQDN = "DHCP4_GENERATE_FQDN";
@@ -216,6 +217,7 @@ const char* values[] = {
"DHCP4_DHCP4O6_RESPONSE_DATA", "%1: responding with packet %2 (type %3), packet details: %4",
"DHCP4_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command",
"DHCP4_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1",
+ "DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS", "dynamic server reconfiguration succeeded with file: %1",
"DHCP4_EMPTY_HOSTNAME", "%1: received empty hostname from the client, skipping processing of this option",
"DHCP4_FLEX_ID", "flexible identifier generated for incoming packet: %1",
"DHCP4_GENERATE_FQDN", "%1: client did not send a FQDN or hostname; FQDN will be generated for the client",
diff --git a/src/bin/dhcp4/dhcp4_messages.h b/src/bin/dhcp4/dhcp4_messages.h
index 39ba709146..f03c12a8e5 100644
--- a/src/bin/dhcp4/dhcp4_messages.h
+++ b/src/bin/dhcp4/dhcp4_messages.h
@@ -63,6 +63,7 @@ extern const isc::log::MessageID DHCP4_DHCP4O6_RECEIVING;
extern const isc::log::MessageID DHCP4_DHCP4O6_RESPONSE_DATA;
extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION;
extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_FAIL;
+extern const isc::log::MessageID DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS;
extern const isc::log::MessageID DHCP4_EMPTY_HOSTNAME;
extern const isc::log::MessageID DHCP4_FLEX_ID;
extern const isc::log::MessageID DHCP4_GENERATE_FQDN;
diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes
index 968d1fd424..19aa3581ff 100644
--- a/src/bin/dhcp4/dhcp4_messages.mes
+++ b/src/bin/dhcp4/dhcp4_messages.mes
@@ -319,6 +319,10 @@ as a result of receiving SIGHUP signal or config-reload command.
This is a fatal error message logged when the dynamic reconfiguration of the
DHCP server failed.
+% DHCP4_DYNAMIC_RECONFIGURATION_SUCCESS dynamic server reconfiguration succeeded with file: %1
+This is info message logged when the dynamic reconfiguration of the DHCP server
+succeeded.
+
% DHCP4_EMPTY_HOSTNAME %1: received empty hostname from the client, skipping processing of this option
This debug message is issued when the server received an empty Hostname option
from a client. Server does not process empty Hostname options and therefore
diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
index db9f05049f..faa27ed0f3 100644
--- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc
+++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
@@ -260,7 +260,9 @@ ControlledDhcpv6Srv::commandConfigReloadHandler(const string&,
std::string file = ControlledDhcpv6Srv::getInstance()->getConfigFile();
try {
LOG_INFO(dhcp6_logger, DHCP6_DYNAMIC_RECONFIGURATION).arg(file);
- return (loadConfigFile(file));
+ auto result = loadConfigFile(file);
+ LOG_INFO(dhcp6_logger, DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS).arg(file);
+ return (result);
} catch (const std::exception& ex) {
// Log the unsuccessful reconfiguration. The reason for failure
// should be already logged. Don't rethrow an exception so as
diff --git a/src/bin/dhcp6/dhcp6_messages.cc b/src/bin/dhcp6/dhcp6_messages.cc
index 9ef9843c3a..d49a77797f 100644
--- a/src/bin/dhcp6/dhcp6_messages.cc
+++ b/src/bin/dhcp6/dhcp6_messages.cc
@@ -60,6 +60,7 @@ extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVING = "DHCP6_DHCP4O6_RECEIV
extern const isc::log::MessageID DHCP6_DHCP4O6_SEND_FAIL = "DHCP6_DHCP4O6_SEND_FAIL";
extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION = "DHCP6_DYNAMIC_RECONFIGURATION";
extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_FAIL = "DHCP6_DYNAMIC_RECONFIGURATION_FAIL";
+extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS = "DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS";
extern const isc::log::MessageID DHCP6_FLEX_ID = "DHCP6_FLEX_ID";
extern const isc::log::MessageID DHCP6_HANDLE_SIGNAL_EXCEPTION = "DHCP6_HANDLE_SIGNAL_EXCEPTION";
extern const isc::log::MessageID DHCP6_HOOKS_LIBS_RELOAD_FAIL = "DHCP6_HOOKS_LIBS_RELOAD_FAIL";
@@ -215,6 +216,7 @@ const char* values[] = {
"DHCP6_DHCP4O6_SEND_FAIL", "failed to send DHCPv4o6 packet: %1",
"DHCP6_DYNAMIC_RECONFIGURATION", "initiate server reconfiguration using file: %1, after receiving SIGHUP signal or config-reload command",
"DHCP6_DYNAMIC_RECONFIGURATION_FAIL", "dynamic server reconfiguration failed with file: %1",
+ "DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS", "dynamic server reconfiguration succeeded with file: %1",
"DHCP6_FLEX_ID", "flexible identifier generated for incoming packet: %1",
"DHCP6_HANDLE_SIGNAL_EXCEPTION", "An exception was thrown while handing signal: %1",
"DHCP6_HOOKS_LIBS_RELOAD_FAIL", "reload of hooks libraries failed",
diff --git a/src/bin/dhcp6/dhcp6_messages.h b/src/bin/dhcp6/dhcp6_messages.h
index aec6056d96..aa70f8dd5e 100644
--- a/src/bin/dhcp6/dhcp6_messages.h
+++ b/src/bin/dhcp6/dhcp6_messages.h
@@ -61,6 +61,7 @@ extern const isc::log::MessageID DHCP6_DHCP4O6_RECEIVING;
extern const isc::log::MessageID DHCP6_DHCP4O6_SEND_FAIL;
extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION;
extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_FAIL;
+extern const isc::log::MessageID DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS;
extern const isc::log::MessageID DHCP6_FLEX_ID;
extern const isc::log::MessageID DHCP6_HANDLE_SIGNAL_EXCEPTION;
extern const isc::log::MessageID DHCP6_HOOKS_LIBS_RELOAD_FAIL;
diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes
index ee2af1e04a..96c245714d 100644
--- a/src/bin/dhcp6/dhcp6_messages.mes
+++ b/src/bin/dhcp6/dhcp6_messages.mes
@@ -316,6 +316,10 @@ as a result of receiving SIGHUP signal or config-reload command.
This is a fatal error message logged when the dynamic reconfiguration of the
DHCP server failed.
+% DHCP6_DYNAMIC_RECONFIGURATION_SUCCESS dynamic server reconfiguration succeeded with file: %1
+This is info message logged when the dynamic reconfiguration of the DHCP server
+succeeded.
+
% DHCP6_FLEX_ID flexible identifier generated for incoming packet: %1
This debug message is printed when host reservation type is set to flexible identifier
and the expression specified in its configuration generated (was evaluated to)