From: Thomas Markwalder Date: Thu, 6 Aug 2020 18:31:42 +0000 (-0400) Subject: [#1369] Added retry logic to kea-dhcp6 and ChangeLog X-Git-Tag: Kea-1.8.0~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c84acf33bc50831bcbe3e584a813568b4f4e76f;p=thirdparty%2Fkea.git [#1369] Added retry logic to kea-dhcp6 and ChangeLog --- diff --git a/ChangeLog b/ChangeLog index 0b2b61ca6b..c0241a25c8 100644 --- 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. diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc index ed339a0abd..f89da13a0d 100644 --- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc +++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc @@ -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());