1. 19 Jun, 2020 2 commits
  2. 25 Feb, 2020 1 commit
  3. 06 Feb, 2020 1 commit
    • Thomas Markwalder's avatar
      [#1108] Servers execute shutdown on unrecoverable DBs · ae1272d3
      Thomas Markwalder authored
      Added ChangeLog entry
      
      src/bin/dhcp4/ctrl_dhcp4_srv.*
          ControlledDhcpv4Srv::dbLostCallback() - schedules a shutdown
          once retries have been exhausted/disableld
      
      src/bin/dhcp6/ctrl_dhcp6_srv.*
          ControlledDhcpv6Srv::dbLostCallback() - schedules a shutdown
          once retries have been exhausted/disableld
      
      src/lib/database/database_connection.h
          class DbUnrecoverableError - new exception
      
      src/lib/mysql/mysql_connection.h
          MySqlConnection::check_error() - throws DbUnrecoverableError
          instead of calling exit()
      
      src/lib/pgsql/pgsql_connection.*
          PgSqlConnection::checkStatementError() - throws DbUnrecoverableError
          instead of calling exit()
      ae1272d3
  4. 04 Dec, 2019 1 commit
  5. 15 Oct, 2019 1 commit
  6. 22 Jul, 2019 1 commit
  7. 02 Jul, 2019 1 commit
  8. 03 Sep, 2018 3 commits
  9. 07 Jul, 2018 1 commit
  10. 21 Jun, 2018 1 commit
  11. 06 Apr, 2018 1 commit
    • Thomas Markwalder's avatar
      [5556a] MySQL lease and host backends now support configurable auto-reconnect · f09bf17e
      Thomas Markwalder authored
          src/lib/dhcpsrv/mysql_connection.h
              MySqlConnection::checkError<>() - modified to invoke
              db lost callback
      
          src/lib/dhcpsrv/dhcpsrv_messages.mes
              Updated log messages
      
          src/lib/dhcpsrv/mysql_lease_mgr.cc
              MySqlLeaseMgr::getVersion() - updated to use checkError()
      
          src/lib/dhcpsrv/pgsql_connection.*
              PgSqlResult::PgSqlResult(PGresult *result) - now supports
              construction with null PGresult. This is to accomodate rare
              cases when PQ* statements can return NULL.
      
          src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.*
              class LeaseMgrDbLostCallbackTest - new test fixture for
              testing LeaseMgr DBLostCallback behavior
      
          src/lib/dhcpsrv/tests/host_mgr_unittest.cc
              class HostMgrDbLostCallbackTest
              class MySQLHostMgrDbLostCallbackTest
              class PostgreSQLHostMgrDbLostCallbackTest
              - new test fixtures for testing HostMgr DBLostCallback behavior
      
          src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
              class MySQLLeaseMgrDbLostCallbackTest - new test fixture for
              testing MySQL LeaseMgr DBLostCallback behavior
      
          src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
              class PgSqlLeaseMgrDbLostCallbackTest - new test fixture for
              testing Postgresql LeaseMgr DBLostCallback behavior
      
          src/lib/dhcpsrv/tests/test_utils.*
              int findLastSocketFd() - new function used for finding what
              should be the fd of the SQL client socket
      
          doc/guide/dhcp4-srv.xml
          doc/guide/dhcp6-srv.xml
              Updated lease and host database parameter sections
      f09bf17e
  12. 22 Mar, 2018 1 commit
  13. 07 Mar, 2018 1 commit
    • Thomas Markwalder's avatar
      [5477] Addressed review comments · 8f5ce706
      Thomas Markwalder authored
      src/bin/dhcp4/ctrl_dhcp4_srv.*
      src/bin/dhcp6/ctrl_dhcp6_srv.*
          Changed dbReconnect() to accept ReconnectCtlPtr
          Added commentary for dbReconnect and dbLostCallback
      
      src/lib/dhcpsrv/database_connection.h
          Removed extraneous typedef
      
      many files:
          Changed DatabaseConnection::Callback to ::DbLostCallback
      
      src/lib/dhcpsrv/tests/database_connection_unittest.cc
          Added commentary to text fixture and tests
      8f5ce706
  14. 28 Feb, 2018 1 commit
    • 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
  15. 17 Dec, 2017 1 commit
  16. 07 Nov, 2017 1 commit
  17. 14 Apr, 2017 1 commit
  18. 12 Apr, 2017 1 commit
  19. 11 Jan, 2017 1 commit
  20. 14 Dec, 2016 2 commits
  21. 25 Aug, 2016 1 commit
  22. 28 Jul, 2016 1 commit
  23. 14 Jul, 2016 2 commits
    • Thomas Markwalder's avatar
      [4277] Added PostgreSQL HR Managment section to developer's guide · c941012d
      Thomas Markwalder authored
      src/lib/dhcprsrv/images/pgsql_host_data_source.svg
          - New class diagram for PgSqlHostDataSource
      
      doc/Doxyfile
          - Added src/lib/dhcprsrv/images to IMAGE_PATH
      
      src/lib/dhcpsrv/Makefile.am
          - Added images/pgsql_host_data_source.svg to EXTRA_DIST
      
      src/lib/dhcpsrv/libdhcpsrv.dox
          - Added subsection postgreSQLHostMgr
      
      src/lib/dhcpsrv/pgsql_connection.h
      src/lib/dhcpsrv/pgsql_exchange.h
          - Minor cleanup
      c941012d
    • Thomas Markwalder's avatar
      [4277] Addressed bulk of review comments · 15b51b62
      Thomas Markwalder authored
      src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
          - Added PgSqlBasicsTest test fixture class and tests which exercise all of
          the PostgreSQL data types we currently use with round-trip database writes
          and reads
      
      src/lib/dhcpsrv/pgsql_connection.cc
      src/lib/dhcpsrv/pgsql_connection.h
          - Moved PgSqlResult function impls from .h
          - Added exception safe implementation of getColumnLabel() to PgSqlResult
      
      src/lib/dhcpsrv/pgsql_exchange.cc
      src/lib/dhcpsrv/pgsql_exchange.h
          - PsqlBindArray::add() variants which accept raw pointers now throw
          if the pointer is NULL
          - PgSqlExchange::getColumnLabel() is now a wrapper around PgSqlResult method
      
      src/lib/dhcpsrv/pgsql_host_data_source.h
      src/lib/dhcpsrv/pgsql_host_data_source.cc
           - Commentary clean up
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
           - Commentary clean up
      15b51b62
  24. 08 Jul, 2016 1 commit
  25. 04 Jul, 2016 1 commit
  26. 27 Jun, 2016 1 commit
  27. 24 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4277] PgSqlHostWithOptionsExchange, PgSqlOptionExchange now functional · 3c01633e
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_connection.h
          Added OID_TEXT
      
      src/lib/dhcpsrv/pgsql_exchange.cc
          PsqlBindArray::addNull()
      
          class PgSqlExchange
              - getColumnLabel() - now gets column name from result set
              - getColumnValue variants are now static methods
              - rename column_labels_ to columns_
              - isColumnNull() new method tests if column in row is null
              - dumpRow() - debug method dumps row as text
      
      src/lib/dhcpsrv/pgsql_host_data_source.cc
          PgSqlHostWithOptionsExchange
          PgSqlOptionExchange  now functional
      
      src/lib/dhcpsrv/tests/pgsql_host_data_source_unittest.cc
          TEST_F(PgSqlHostDataSourceTest, addDuplicate4)
          TEST_F(PgSqlHostDataSourceTest, formattedOptionsReservations4)
          - Enabled and passing.
      3c01633e
  28. 21 Jun, 2016 1 commit
    • Thomas Markwalder's avatar
      [4277] Bare bones implementation of PgSqlHostDataSource · 33428957
      Thomas Markwalder authored
      src/lib/dhcpsrv
          pgsql_host_data_source.c
          pgsql_host_data_source.h  - new files, preliminary implementation
      
      src/lib/dhcpsrv/Makefile.am
          Added new files pgsql_host_data_source.cc, pgsql_host_data_source.h
      
      src/lib/dhcpsrv/dhcpsrv_messages.mes
          Added log messages DHCPSRV_PGSQL_HOST_DB_GET_VERSION, DHCPSRV_PGSQL_START_TRANSACTION
      
      src/lib/dhcpsrv/pgsql_connection.cc
      src/lib/dhcpsrv/pgsql_connection.h
          Added PgSqlTransaction
          Added PgSqlConnection::startTransaction()
      
      src/lib/dhcpsrv/pgsql_exchange.cc
      src/lib/dhcpsrv/pgsql_exchange.h
          PsqlBindArray
          - Added storage of conversion strings used for bound values
          - Added add() variants for uint8_t, IOAddress, uint8_t buffer
          - Added templated variant for miscellaneous types
      
          PgSqlExchange
          - Removed getColumnValue variants for various integers, replaced
          with templated version for miscellaneous types
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          Added todo comment to remember to account for hwaddr columns added to lease6
      
      src/lib/dhcpsrv/tests/pgsql_exchange_unittest.cc
          TEST(PsqlBindArray, basicOperation) - new test to exercise bind functions
      33428957
  29. 13 Jun, 2016 1 commit
  30. 23 May, 2016 1 commit
  31. 18 May, 2016 1 commit
  32. 17 May, 2016 1 commit