Skip to content
  • Thomas Markwalder's avatar
    [5477] dhcpsrv/postgres and kea-dhcp4 now support db reconnect · 249219f1
    Thomas Markwalder authored
    kea-dhcp4
        added support for max-reconnect-tries and reconnect-wait-time
        to lease and host db parsers
    
        Added a callback for when DB backends detect loss of connectivity
    
        Added a self-rescheduling method to attempt to reconnect to the
        backends if retries are enabled
    
    dhcpsrv
        Added a callback that DatabaseConnection derivations should invoke
        when they lose connectivity.
    
        Added an optional callback parameter from CfgDbAccess::createManagers()
        all the way down to DatabaseConnection ctor.
    
        pgsql_connection.cc
            PgSqlConnection::~PgSqlConnection() - Added logic to close the
            connection only when the connect state is still OK.
            Otherwise it likes to core dump.
    
            PgSqlConnection::checkStatementError() - Modified to invoke the
            connectivity lost callback on "fatal" errors
    
        pgsql_lease_mgr_unittest.cc
        pgsql_host_data_source_unittest.cc
            Added tests to verify that the lost callback is NOT invoked on an
            open failure
    249219f1