1. 17 Jan, 2020 1 commit
  2. 10 Dec, 2019 3 commits
  3. 05 Dec, 2019 1 commit
  4. 04 Dec, 2019 1 commit
  5. 25 Oct, 2019 1 commit
  6. 28 Jun, 2019 1 commit
    • Thomas Markwalder's avatar
      [#651,!384] Fix input IAID in postgresql lease6 fetchers · 209ac10e
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          PgSqlLease6Exchange::Uiaid - made this public and added function to
          return the int32 bit value as a string
      
          PgSqlLeaseMgr::getLeases6() - uses Uiaid.dbInputString() now
      
      src/lib/dhcpsrv/tests/generic_lease_mgr_unittest.*
          GenericLeaseMgrTest::testLease6LargeIaidCheck() - new test to
          ensure large value iaids can be stored.
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          TEST_F(PgSqlLeaseMgrTest, leases6LargeIaidCheck) - new test
      
      src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
          TEST_F(CqlLeaseMgrTest, lease6InvalidHostname) - new test
      
      src/lib/dhcpsrv/tests/mysql_lease_mgr_unittest.cc
          TEST_F(MySqlLeaseMgrTest, leases6LargeIaidCheck) - new test
      209ac10e
  7. 19 Jun, 2019 1 commit
  8. 22 May, 2019 1 commit
  9. 13 Mar, 2019 2 commits
    • Thomas Markwalder's avatar
      [#531,!279] PgSQL unit testing now supports data wipe · d88c013d
      Thomas Markwalder authored
      src/share/database/scripts/pgsql
          wipe_data.sh.in - new file
      
      doc/devel/unit-tests.dox
          Removed MySQL/CQL only comment
      
      several files:
          Added commentary and removed superflous calls to destroyPgSQLSchema
      
      src/lib/pgsql/testutils/pgsql_schema.*
          destroyPgSQLSchema()
          createPgSQLSchema() - modified to support data wiping
          wipePgSQLData() - new function
      
      src/lib/pgsql/tests
          pgsql_schema.cc
      	pgsql_schema.h - deleted these. They appear to have
          been added by mistake.
      d88c013d
    • Thomas Markwalder's avatar
      [#531,!279] PgSQL unit testing now supports data wipe · 2a310d99
      Thomas Markwalder authored
      src/share/database/scripts/pgsql
          wipe_data.sh.in - new file
      
      doc/devel/unit-tests.dox
          Removed MySQL/CQL only comment
      
      several files:
          Added commentary and removed superflous calls to destroyPgSQLSchema
      
      src/lib/pgsql/testutils/pgsql_schema.*
          destroyPgSQLSchema()
          createPgSQLSchema() - modified to support data wiping
          wipePgSQLData() - new function
      
      src/lib/pgsql/tests
          pgsql_schema.cc
      	pgsql_schema.h - deleted these. They appear to have
          been added by mistake.
      2a310d99
  10. 03 Sep, 2018 3 commits
  11. 13 Aug, 2018 1 commit
  12. 28 Jun, 2018 1 commit
  13. 26 Jun, 2018 2 commits
  14. 25 Jun, 2018 1 commit
  15. 09 May, 2018 1 commit
    • Thomas Markwalder's avatar
      [5587] PostgreSQL support for shared lease stats implementation · b0bea19c
      Thomas Markwalder authored
      src/share/database/scripts/pgsql/dhcpdb_create.pgsql
          Adds lease<4/6>_stat tables and triggers
      src/share/database/scripts/pgsql/dhcpdb_drop.pgsql
          Added drops for lease<4/6>_stat tables and triggers
      
      src/share/database/scripts/pgsql/upgrade_3.3_to_4.0.sh.in
          Adds lease<4/6>_stat tables and triggers
          Populates stat tables from existing lease table content
      src/bin/admin/tests/mysql_tests.sh.in
          mysql_lease6_stat_per_type() - fixed typo in test
      
      src/bin/admin/tests/pgsql_tests.sh.in
          run_statement() - new convenience fucntion for
          running statement with option expected outcome
      
          pgsql_upgrade_schema_to_version() - new function
          which converts the existing schema to a target version
      
          pgsql_lease4_stat_test() - tests v4 stat table and
          triggers in an new database
      
          pgsql_lease6_stat_test() - tests v6 stat table and
          triggers in an new database.
      
          pgsql_lease6_stat_per_type() - helper function which
          tests v6 stat table and triggers using a given address
          and lease type
      
          pgsql_lease_stat_upgrade_test() - tests data migration,
          stat table and trigger operations on an upgraded database
      
      src/lib/dhcpsrv/pgsql_lease_mgr.*
          Added new SQL statements for lease stats queries
      
          PgSqlLeaseStatsQuery
              Constructors - added variants to support where clause params
              start() - modified to support query variants based
              on where clause params
      
          PgSqlLeaseMgr
              Added start variants:
              - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id)
              - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
                                               const SubnetID& last_subnet_id)
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          New unit tests:
          - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery4)
          - TEST_F(PgSqlLeaseMgrTest, leaseStatsQuery6)
      b0bea19c
  16. 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
  17. 22 Mar, 2018 1 commit
  18. 12 Mar, 2018 1 commit
  19. 28 Feb, 2018 2 commits
    • 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
    • Razvan Becheriu's avatar
      minor changes · b86f313c
      Razvan Becheriu authored
      b86f313c
  20. 19 Feb, 2018 1 commit
  21. 12 Jan, 2018 1 commit
  22. 09 Jan, 2018 1 commit
  23. 07 Aug, 2017 1 commit
  24. 20 Jan, 2017 1 commit
  25. 14 Dec, 2016 1 commit
  26. 24 Aug, 2016 1 commit
    • Thomas Markwalder's avatar
      [4294] Refactored PgSql stats classes · 92ffb413
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_lease_mgr.h
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
              Replaced this class heirarchy:
              AddressStatsQuery4 <-- PgSqlAddressStatsQuery4
              AddressStatsQuery6 <-- PgSqlAddressStatsQuery6
      
              With this one:
              LeaseStatsQuery <-- PgSqlLeaseStatsQuery
      92ffb413
  27. 16 Aug, 2016 1 commit
    • Thomas Markwalder's avatar
      [4294] PostgreSQL now supports IPv6 lease stats recounting · efbf437f
      Thomas Markwalder authored
      src/lib/dhcpsrv/pgsql_lease_mgr.h
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          - Added TaggedStatement RECOUNT_LEASE6_STATS
          - PgSqlAddressStatsQuery6 - new class PgSql derivation of the IPv6
          statistical lease data query
          - PgSqlLeaseMgr::startAddressStatsQuery6() - new virtual method which
          creates and runs the IPv6 lease stats query
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          TEST_F(PgSqlLeaseMgrTest, recountAddressStats6) - new test
      efbf437f
  28. 15 Aug, 2016 1 commit
    • Thomas Markwalder's avatar
      [4294] PostgreSQL now supports IPv4 lease stats recount · 64c23c76
      Thomas Markwalder authored
      src/lib/dhcpsrv/cfg_subnets4.cc
          CfgSubnets4::updateStatistics() - removed lease mgr instance check
      
      src/lib/dhcpsrv/mysql_lease_mgr.cc
          Added "ORDER by subnet_id" to RECOUNT_LEASE4_STATS
      
      src/lib/dhcpsrv/pgsql_lease_mgr.cc
          Added tagged statement RECOUNT_LEASE4_STATS
          PgSqlAddressStatsQuery4 - new class, PostgreSQL derivation of AddressStatsQuery4
          PgSqlLeaseMgr::startAddressStatsQuery4() - PostgreSQL impl of virtual method
      
      src/lib/dhcpsrv/srv_config.cc -
          SrvConfig::updateStatistics() - Added LeaseMgr singleton check around
          calls subnet statistics updates
      
      src/lib/dhcpsrv/tests/cfgmgr_unittest.cc
          CfgMgrTest:
             ~CfgMgrTest() - now destroys LeaseMgr singleton
             startBackend(int family = AF_INET) -  new method to create memfile lease mgr
      
              TEST_F(CfgMgrTest, commitStats4)
              TEST_F(CfgMgrTest, commitStats6)
          - added call to startBackend()
      
      src/lib/dhcpsrv/tests/pgsql_lease_mgr_unittest.cc
          TEST_F(PgSqlLeaseMgrTest, recountAddressStats4) - new test
      64c23c76
  29. 08 Jul, 2016 1 commit
  30. 04 Jul, 2016 1 commit
  31. 23 Jun, 2016 3 commits