1. 17 Jan, 2020 1 commit
  2. 10 Dec, 2019 3 commits
  3. 25 Oct, 2019 1 commit
  4. 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
  5. 19 Jun, 2019 1 commit
  6. 28 May, 2019 1 commit
  7. 22 May, 2019 1 commit
  8. 12 Mar, 2019 2 commits
    • Thomas Markwalder's avatar
      [#526,!269] More clean up · bee6240b
      Thomas Markwalder authored
          General clean up, changed CQL params to be same order as MySQL.
      bee6240b
    • Thomas Markwalder's avatar
      [#526,!269] Added env var control and CQL symmetry · 878ce0b4
      Thomas Markwalder authored
      Data wiping is on by default, for both MySQL and CQL
      (not yet implemented for Postgresql) and but can be
      overridden by KEA_TEST_DB_WIPE_DATA_ONLY.
      
      src/lib/mysql/testutils/mysql_schema.*
          destroyMySQLSchema()
          createMySQLSchema() - added check of softWipeEnabled() to
          see if env var has turned it OFF.
      
      Changed CQL to work the same way as MySQL:
      
      src/share/database/scripts/cql
          wipe_data.sh.in - new file, replaces soft_wipe.cql
      
      src/lib/cql/testutils/cql_schema.*
          destroyCqlSchema() - now destroys the schema
          if data wipe fails or is disabled
      
          createCqlSchema() - now drops/creates the schema
          if data wipe fails or is disabled.
      
          runCqlScript(() - added request-timeout to prevent
          timeout errors in slow environments
      
          wipeCqlData(bool show_err) - new function that
          attempts to run the wipe shell script
      
      src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
          Removed now superflous destroyCqlSchema calls
      878ce0b4
  9. 03 Sep, 2018 3 commits
  10. 13 Aug, 2018 1 commit
  11. 28 Jun, 2018 1 commit
  12. 26 Jun, 2018 1 commit
  13. 25 Jun, 2018 1 commit
  14. 09 May, 2018 1 commit
    • Thomas Markwalder's avatar
      [5588] Cassandra shared lease stats support implemented · 83318b90
      Thomas Markwalder authored
          Note this impl is done with calculate-on-demand SQL
          statements rather than stat tables pluse triggers.
      
      src/lib/dhcpsrv/cql_lease_mgr.*
          Added new SQL statements for lease stats queries
      
          CqlLeaseStatsQuery
              Constructors - added variants to support where clause params
      
              start() - modified to support query variants based
              on where clause params
      
         CqlSqlLeaseMgr
              Added start variants:
              - startSubnetLeaseStatsQuery4(const SubnetID& subnet_id)
              - startSubnetRangeLeaseStatsQuery4(const SubnetID& first_subnet_id,
                                                   const SubnetID& last_subnet_id)
      
      src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
          New unit tests:
          - TEST_F(CqlLeaseMgrTest, leaseStatsQuery4)
          - TEST_F(CqlLeaseMgrTest, leaseStatsQuery6)
      83318b90
  15. 14 Mar, 2018 1 commit
  16. 12 Mar, 2018 1 commit
  17. 28 Feb, 2018 1 commit
  18. 19 Feb, 2018 1 commit
  19. 24 Jan, 2018 2 commits
  20. 23 Jan, 2018 1 commit
    • Thomas Markwalder's avatar
      [5487] checkpoint commit · fa11dc5c
      Thomas Markwalder authored
          recount4/6 both work, using queries that return rows for all leases.
          Needs cleanup and optimization
      
      src/lib/dhcpsrv/cql_lease_mgr.cc
          added new class CqlLeaseStatsQuery : public LeaseStatsQuery, CqlExchange
      
          CqlLeaseMgr::CqlLeaseMgr()
              prepares CqlLeaseStatsQuery statements
      
          CqlLeaseMgr::startLeaseStatsQuery4()
          CqlLeaseMgr::startLeaseStatsQuery6()
              Create and start CqlLeaseStatsQuery()
      
      src/lib/dhcpsrv/lease_mgr.h
          Added LeaseStatsRows::operator<
      
      src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
          Enabled CqlLeaseMgrTest.recountLeaseStats4/6
      fa11dc5c
  21. 29 Dec, 2017 2 commits
  22. 31 Aug, 2017 1 commit
  23. 18 Aug, 2017 1 commit
    • Andrei Pavel's avatar
      boost::any for cassandra and more: · 11cc65e3
      Andrei Pavel authored
      - replaced void* with boost::any for type safety (might be just a bit less efficient)
      - replaced a multi-index-container used for statement parameters ( with position index and name index ) and a vector of the same parameters with a compile-time type-based map
      - refactored lease manager to use exchanges
      - exchanges now support UDTs (user defined types) and collections to be used in Cassandra statements
      - replaced size-ambiguous types (e.g. int) with size-explicit types (e.g. int32_t) in Cassandra-related code
      - made exception messages and log messages more detailed and consistent in format
      11cc65e3
  24. 07 Aug, 2017 1 commit
  25. 11 Jan, 2017 3 commits
    • Andrei Pavel's avatar
      Cassandra Host Data Source stress test · 6efa71b9
      Andrei Pavel authored
      It is part of the generic_host_data_source_unittest.cc, able to be
      implemented for other HDS as well. It executes INSERT statements and
      a certain SELECT statement which Cassandra struggles in performance
      with since it has to do two queries instead of a join. All statement
      executions are timed and repeated on an increasingly number of hosts.
      It is placed last and DISABLED_ as you don't want to run this during
      a usual make check.
      6efa71b9
    • Andrei Pavel's avatar
      minor changes · 53f76550
      Andrei Pavel authored
      53f76550
    • Andrei Pavel's avatar
      Cassandra update · 8c71bbbc
      Andrei Pavel authored
      Replaced unrecommended backticks with $() in cql_version() in bash scripts.
      
      *_execute() and *_execute_script() functions from src/bin/admin/admin-utils.sh now pass the parameters to the underlying backend binary whenever they are given rather than when there are 2 or more.
      
      Corrected cql_version() return error in src/bin/admin/admin-utils.sh.
      
      Removed redundant "USE" from cql_init() in src/bin/admin/kea-admin.in.
      
      Inserted a newline in src/bin/admin/tests/Makefile.am to separate unrelated targets.
      
      Style changes in cql_*_test() functions in src/bin/admin/tests/cql_tests.sh.in.
      
      src/bin/admin/tests/dhcpdb_create_1.0.cql:
          "perfromance" typo
          Added comment headers
          Added index on expire since it is used in WHERE clauses (further performance testing may be required)
          Removed dhcp4_options and dhcp6_options table since they are not required for Cassandra
      
      Added DROP INDEX in src/share/database/scripts/cql/dhcpdb_drop.cql.
      
      Added sql_common.h
      Added cql_exchange.h and cql_exchange.cc which mediate communication with Cassandra.
      Added cql_lease_mgr.h and cql_lease_mgr.cc
      
      Parameterized reconnect-wait-time, connect-timeout, request-timeout, tcp-keepalive, tcp-nodelay for Cassandra in kea.conf. Changes are in src/lib/dhcpsrv/cql_connection.cc and src/lib/dhcpsrv/parsers/dbaccess_parser.cc.
      
      Reformated x != NULL into !x as specified in the Kea style guidelines
      
      src/lib/dhcpsrv/cql_connection.cc:
          Added range check for port
          Added CqlConnection:setConsistency
          Added CqlConnection::startTransaction  which is a noop
          Added CqlTransaction method implementations.
          Corrected ending brace of namespace declaration, it doesn't need semicolon.
      
      src/lib/dhcpsrv/cql_connection.h:
          Added explicit on CqlConnection constructor. Unlikely that this class will ever be derived, but it's good practice.
          Changed some comments.
          Added CqlTransaction class definition.
      
      src/lib/dhcpsrv/cql_lease_mgr.cc:
          Formatted the entire code.
          Changed data types to cass_ types.
      
      Added some log messages.
      
      Moved structs, enums and typedefs from src/lib/dhcpsrv/lease_mgr.h to src/lib/dhcpsrv/sql_common.h
      
      Added some missing tests in src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
      8c71bbbc
  26. 14 Dec, 2016 1 commit
    • Andrei Pavel's avatar
      Cassandra update · 50fd7903
      Andrei Pavel authored
      Replaced unrecommended backticks with $() in cql_version() in bash scripts.
      
      *_execute() and *_execute_script() functions from src/bin/admin/admin-utils.sh now pass the parameters to the underlying backend binary whenever they are given rather than when there are 2 or more.
      
      Corrected cql_version() return error in src/bin/admin/admin-utils.sh.
      
      Removed redundant "USE" from cql_init() in src/bin/admin/kea-admin.in.
      
      Inserted a newline in src/bin/admin/tests/Makefile.am to separate unrelated targets.
      
      Style changes in cql_*_test() functions in src/bin/admin/tests/cql_tests.sh.in.
      
      src/bin/admin/tests/dhcpdb_create_1.0.cql:
          "perfromance" typo
          Added comment headers
          Added index on expire since it is used in WHERE clauses (further performance testing may be required)
          Removed dhcp4_options and dhcp6_options table since they are not required for Cassandra
      
      Added DROP INDEX in src/share/database/scripts/cql/dhcpdb_drop.cql.
      
      Added sql_common.h
      Added cql_exchange.h and cql_exchange.cc which mediate communication with Cassandra.
      Added cql_lease_mgr.h and cql_lease_mgr.cc
      
      Parameterized reconnect-wait-time, connect-timeout, request-timeout, tcp-keepalive, tcp-nodelay for Cassandra in kea.conf. Changes are in src/lib/dhcpsrv/cql_connection.cc and src/lib/dhcpsrv/parsers/dbaccess_parser.cc.
      
      Reformated x != NULL into !x as specified in the Kea style guidelines
      
      src/lib/dhcpsrv/cql_connection.cc:
          Added range check for port
          Added CqlConnection:setConsistency
          Added CqlConnection::startTransaction  which is a noop
          Added CqlTransaction method implementations.
          Corrected ending brace of namespace declaration, it doesn't need semicolon.
      
      src/lib/dhcpsrv/cql_connection.h:
          Added explicit on CqlConnection constructor. Unlikely that this class will ever be derived, but it's good practice.
          Changed some comments.
          Added CqlTransaction class definition.
      
      src/lib/dhcpsrv/cql_lease_mgr.cc:
          Formatted the entire code.
          Changed data types to cass_ types.
      
      Added some log messages.
      
      Moved structs, enums and typedefs from src/lib/dhcpsrv/lease_mgr.h to src/lib/dhcpsrv/sql_common.h
      
      Added some missing tests in src/lib/dhcpsrv/tests/cql_lease_mgr_unittest.cc
      50fd7903
  27. 04 Jul, 2016 1 commit
  28. 23 Jun, 2016 4 commits