]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1369] Added retry logic to kea-dhcp6 and ChangeLog
authorThomas Markwalder <tmark@isc.org>
Thu, 6 Aug 2020 18:31:42 +0000 (14:31 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 12 Aug 2020 19:19:37 +0000 (15:19 -0400)
ChangeLog
src/bin/dhcp6/ctrl_dhcp6_srv.cc

index 0b2b61ca6be11f193801327e8baaacf16e1dc803..c0241a25c8bc0f6cf1a548a062e0bb75e27f61c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1792.  [bug]           tmark
+       Corrected a bug that causes kea-dhcp4/kea-dhcp6 servers to crash after
+       losing connectivity to a configuration backend database.  The servers
+       now correctly honor the max-reconnect-tries parameter.
+       (Gitlab #1369)
+
 1781.  [bug]           razvan
        Reject invalid declined state for PD prefix in add and update
        commands in lease-cmds hook.
index ed339a0abd62eab37820cc526a18580a1792dc24..f89da13a0da8dc7f3e44bea1dd09c6c316f31eb1 100644 (file)
@@ -1155,10 +1155,17 @@ void
 ControlledDhcpv6Srv::dbReconnect(ReconnectCtlPtr db_reconnect_ctl) {
     bool reopened = false;
 
-    // Re-open lease and host database with new parameters.
+    // We lost at least one of them, Reopen all of them (lease, host, and CB databases)
     try {
         CfgDbAccessPtr cfg_db = CfgMgr::instance().getCurrentCfg()->getCfgDbAccess();
         cfg_db->createManagers();
+
+        auto ctl_info = CfgMgr::instance().getCurrentCfg()->getConfigControlInfo();
+        if (ctl_info) {
+            auto srv_cfg = CfgMgr::instance().getCurrentCfg();
+            server_->getCBControl()->databaseConfigConnect(srv_cfg);
+        }
+
         reopened = true;
     } catch (const std::exception& ex) {
         LOG_ERROR(dhcp6_logger, DHCP6_DB_RECONNECT_ATTEMPT_FAILED).arg(ex.what());