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
// 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));
}
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();
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();