+2448. [func] razvan
+ The kea servers return a new status ("result" with value 5) for
+ commands which have failed and have partially altered the running
+ configuration. The rollback mechanism was not able to restore
+ the previous configuration.
+ (Gitlab #4389)
+
2447. [func] razvan
When using raw sockets, Kea now properly handles VLAN
interfaces and VLAN tagged packets.
- ``4`` - the well-formed command has been processed but the requested
changes could not be applied, because they were in conflict with the
server state or its notion of the configuration.
+- ``5`` - the command processed has failed and the configuration has been
+ partially altered. The rollback mechanism was not able to restore the previous
+ configuration.
For example, a well-formed command that requests a subnet that exists
in a server's configuration returns the result 0. If the server encounters
SrvConfigPtr srv_config;
+ // Parsing stage is complete. The current configuration has not been altered.
+ // From this stage on, every error might have irreversible consequences and the
+ // configuration might not be restored to a working state.
if (status_code == CONTROL_RESULT_SUCCESS) {
if (check_only) {
if (extra_checks) {
}
} else {
+ // Usually unit tests create managers before calling configureDhcp4Server and
+ // do not call ControlledDhcpv4Srv::processConfig.
+ // Runtime code path creates the managers after calling configureDhcp4Server
+ // and they need to be reset just after successful configuration parsing.
if (!IfaceMgr::instance().isTestMode()) {
// Destroy lease manager before hooks unload.
LeaseMgrFactory::destroy();
SrvConfigPtr srv_config;
+ // Parsing stage is complete. The current configuration has not been altered.
+ // From this stage on, every error might have irreversible consequences and the
+ // configuration might not be restored to a working state.
if (status_code == CONTROL_RESULT_SUCCESS) {
if (check_only) {
if (extra_checks) {
}
} else {
+ // Usually unit tests create managers before calling configureDhcp6Server and
+ // do not call ControlledDhcpv6Srv::processConfig.
+ // Runtime code path creates the managers after calling configureDhcp6Server
+ // and they need to be reset just after successful configuration parsing.
if (!IfaceMgr::instance().isTestMode()) {
// Destroy lease manager before hooks unload.
LeaseMgrFactory::destroy();
const int CONTROL_RESULT_CONFLICT = 4;
/// @brief Status code indicating that the command was unsuccessful and the
-/// configuration cound not be reverted to a working state.
+/// configuration could not be reverted to a working state.
const int CONTROL_RESULT_FATAL_ERROR = 5;
/// @brief A standard control channel exception that is thrown if a function
if (post_config_cb) {
post_config_cb();
}
- } catch (std::exception& ex) {
+ } catch (std::exception&) {
fatal = true;
throw;
} catch (...) {