From: Razvan Becheriu Date: Fri, 17 Mar 2023 11:02:23 +0000 (+0200) Subject: [#2722] addressed comments X-Git-Tag: Kea-2.3.6~64 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cba85e9111d5be67568f61c6063bc5877f154cb;p=thirdparty%2Fkea.git [#2722] addressed comments --- diff --git a/ChangeLog b/ChangeLog index de208fcabe..a78b4b151f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,8 +4,8 @@ previously working configuration if the new configuration is invalid. There are still cases that can leave the server in an unrecoverable state, and such case is indicated by a FATAL - log message. The same functinality applies to the "config-set" - command available to the server through the control channel. + log message. The same logic applies to the "config-set" command + available to the server through the control channel. (Gitlab #2722) 2112. [doc] fdupont diff --git a/src/bin/d2/d2_process.cc b/src/bin/d2/d2_process.cc index dc7dff8915..48026c99c4 100644 --- a/src/bin/d2/d2_process.cc +++ b/src/bin/d2/d2_process.cc @@ -232,7 +232,7 @@ D2Process::shutdown(isc::data::ConstElementPtr args) { // Set the base class's shutdown flag. setShutdownFlag(true); return (isc::config::createAnswer(CONTROL_RESULT_SUCCESS, - "Shutdown initiated, type is: " +\ + "Shutdown initiated, type is: " + type_str)); } diff --git a/src/bin/dhcp4/json_config_parser.cc b/src/bin/dhcp4/json_config_parser.cc index a602c7c98b..3d6c48ce41 100644 --- a/src/bin/dhcp4/json_config_parser.cc +++ b/src/bin/dhcp4/json_config_parser.cc @@ -767,6 +767,14 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set, string parameter_name; ElementPtr mutable_cfg; + // disable multi-threading (it will be applied by new configuration) + // this must be done in order to properly handle MT to ST transition + // when 'multi-threading' structure is missing from new config and + // to properly drop any task items stored in the thread pool which + // might reference some handles to loaded hooks, preventing them + // from being unloaded. + MultiThreadingMgr::instance().apply(false, 0, 0); + // Close DHCP sockets and remove any existing timers. IfaceMgr::instance().closeSockets(); TimerMgr::instance()->unregisterTimers(); diff --git a/src/bin/dhcp6/json_config_parser.cc b/src/bin/dhcp6/json_config_parser.cc index 92cc046da7..58e691c0a8 100644 --- a/src/bin/dhcp6/json_config_parser.cc +++ b/src/bin/dhcp6/json_config_parser.cc @@ -896,6 +896,14 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set, string parameter_name; ElementPtr mutable_cfg; + // disable multi-threading (it will be applied by new configuration) + // this must be done in order to properly handle MT to ST transition + // when 'multi-threading' structure is missing from new config and + // to properly drop any task items stored in the thread pool which + // might reference some handles to loaded hooks, preventing them + // from being unloaded. + MultiThreadingMgr::instance().apply(false, 0, 0); + // Close DHCP sockets and remove any existing timers. IfaceMgr::instance().closeSockets(); TimerMgr::instance()->unregisterTimers();