]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1893] added log message for config reload success
authorRazvan Becheriu <razvan@isc.org>
Thu, 5 Aug 2021 14:21:11 +0000 (17:21 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 9 Aug 2021 20:33:09 +0000 (20:33 +0000)
src/bin/dhcp4/ctrl_dhcp4_srv.cc
src/bin/dhcp4/dhcp4_messages.cc
src/bin/dhcp4/dhcp4_messages.h
src/bin/dhcp4/dhcp4_messages.mes
src/bin/dhcp6/ctrl_dhcp6_srv.cc
src/bin/dhcp6/dhcp6_messages.cc
src/bin/dhcp6/dhcp6_messages.h
src/bin/dhcp6/dhcp6_messages.mes

index 5c04ba0c7b16ebfc89c3b552b85b5cdf7c64f854..2f43c2a5306f5eeef179b31c8b480069733a3bb6 100644 (file)
@@ -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
index ce259fc96e988cf4bbc783a28b35589330fe14b4..62193372576a2c99b13d7b58ad02383b12a0c38c 100644 (file)
@@ -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",
index 39ba709146b3e8ea1e25cbc0f0308a7bfb6199a4..f03c12a8e55efa358b05f3033d0f0329f972847b 100644 (file)
@@ -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;
index 968d1fd424698dcdcd5e862e4130fc422e23e4f9..19aa3581ffa807a2adc597801550827b9037bf6c 100644 (file)
@@ -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
index db9f05049f90e748c7a75eff24b5642430bc83aa..faa27ed0f3a20fb5741a4f511738784e558b5078 100644 (file)
@@ -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
index 9ef9843c3a68bbb77560dd1deef7693840b54b73..d49a77797f704342558eb32fd28befaef4243ed0 100644 (file)
@@ -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",
index aec6056d96d906f1e592cb617d2ee6a84a41e5c3..aa70f8dd5ebefdfc4aa25d20f82da14f4ff20f6e 100644 (file)
@@ -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;
index ee2af1e04a0b4c77a97e8ada387037c87a3c50a3..96c245714d7255a64ad85321b2ab69c75071a94b 100644 (file)
@@ -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)