1. 07 Nov, 2018 40 commits
  2. 08 Aug, 2018 40 commits
  3. 21 Jun, 2018 40 commits
  4. 20 Jan, 2018 40 commits
  5. 31 Dec, 2017 40 commits
  6. 13 Oct, 2017 40 commits
  7. 10 Oct, 2017 40 commits
  8. 23 Jul, 2017 40 commits
  9. 31 Mar, 2017 40 commits
    • Marvin Frick's avatar
      adds support for databse hosts · cee9882a
      Marvin Frick authored
      The `-h` parameter can now be used to specify a database host to use
      instead of implicitely localhost.
      
      Conflicts in rebase to current master:
      	src/bin/admin/admin-utils.sh
      	src/bin/admin/kea-admin.in
      cee9882a
  10. 24 Jan, 2017 40 commits
  11. 11 Jan, 2017 40 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
  12. 14 Dec, 2016 40 commits
    • 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
  13. 28 Aug, 2016 40 commits
  14. 07 Jul, 2016 40 commits
  15. 23 Jun, 2016 40 commits
  16. 16 Dec, 2015 40 commits
  17. 20 Oct, 2015 40 commits
    • Thomas Markwalder's avatar
      [3969] Added upgrade support from Postgres schema 1.0 to 2.0 · 49b0bac2
      Thomas Markwalder authored
      Upgrade adds state column to both lease tables, the state table,
      and the lease dump functions.
      
      src/bin/admin/scripts/pgsql/upgrade_1.0_to_2.0.sh -
          new script for upgrading postgres schema
      
      src/bin/admin/tests/dhcpdb_create_1.0.pgsql
          new sql script for creating 1.0 schema db
      
      configure.ac
          added entry for new upgrade script
      
      src/bin/admin/kea-admin.in
          pgsql_upgrade() - modified to set Postgres password env variable
          and pass in remaining args as psql expects them
      
      src/bin/admin/scripts/pgsql/Makefile.am
          added entry for new upgrade script
      
      src/bin/admin/tests/Makefile.am
          added entry for 1.0 schema script
      
      src/bin/admin/tests/pgsql_tests.sh.in
          pgsql_upgrade_test()  - revamped now that Postgres actually
          has its first upgrade script.
      49b0bac2
  18. 01 Oct, 2015 40 commits
    • Thomas Markwalder's avatar
      [3916] Use stored procedures for MySQL lease dumps · 9ca02bd6
      Thomas Markwalder authored
      src/bin/admin/kea-admin.in
          src/bin/admin/kea-admin.in
              get_dump_query() - modified SQL text returned for MySQL backend
              which calls stored procedures to produce lease dumps  rather than
              SQL text from lease_dump_<version>.sh
      
      src/bin/admin/scripts/mysql/Makefile.am
          removed entries for leave_dump_<version>.sh files
      
      src/bin/admin/scripts/mysql/dhcpdb_create.mysql
          Added sql to create stored procedures for lease dumps:
              lease4DumpHeader
              lease4DumpData
              lease6DumpHeader
              lease6DumpData
      
      src/bin/admin/scripts/pgsql/dhcpdb_create.pgsql
          Changes table references in lease6DumpData() to match
          convention used in MySQL lease6DumpData()
      
      src/bin/admin/tests/mysql_tests.sh.in
          mysql_lease4_dump_test() - change lease4 test leases to have differing
          values for lease4.state
      
          mysql_lease6_dump_test() - change lease4 test leases to have differing
          values for lease6.state
      
      mysql.lease4_dump_test.reference.csv
      mysql.lease6_dump_test.reference.csv
          Changed reference files to use lease_state.name values rather than
          lease.state to match dump query output and  new test data
      
      src/bin/admin/scripts/mysql
          deleted the following files as they are now obsolete
              leave_dump_1.0.sh
              leave_dump_2.0.sh
              leave_dump_3.0.sh
              leave_dump_4.0.sh
          Makefile.am - removed entries for deleted lease dump scripts
      9ca02bd6
  19. 30 Sep, 2015 40 commits
    • Thomas Markwalder's avatar
      [3916] Use stored functions for Postgres lease dumps · 9fbe63fc
      Thomas Markwalder authored
      lease_dump_1.0.sh - deleted, now obsolete
      
      src/bin/admin/scripts/pgsql/Makefile.am
          removed entries for lease_dump_1.0.sh
      
      src/bin/admin/kea-admin.in
          get_dump_query() - modified SQL text returned for Postgres backend
          which calls stored functions to produce lease dumps  rather than
          SQL texti from lease_dump_<version>.sh
      
      src/bin/admin/scripts/pgsql/dhcpdb_create.pgsql
          added statments to create lease dump functions:
              lease4DumpHeader
              lease4DumpData
              lease6DumpHeader
              lease6DumpData
      
      src/bin/admin/tests/data/pgsql.lease6_dump_test.reference.csv
          Booleans were expected be 't' or 'f', changed to int 1 or 0
      9fbe63fc
  20. 29 Jun, 2015 40 commits
  21. 12 Jun, 2015 40 commits
    • Thomas Markwalder's avatar
      [3884] Clean up PostgreSQL admin functions · f34101ec
      Thomas Markwalder authored
      src/bin/admin/admin-utils.sh
          Revamped the PostgreSQL functions to mirror changes made to MySQL
          functions. Primarily, no longer capturing psql output in an environment
          variable.  This provides greater flexibility in the caller.
      f34101ec
  22. 10 Jun, 2015 40 commits
    • Thomas Markwalder's avatar
      [3802] Addressed review comments · 19221f4a
      Thomas Markwalder authored
      Primarily, SQL text for lease-dump now comes from a file and the use of
      PIPESTATUS has been eliminated:
      
      src/bin/admin/admin-utils.sh
      
          mysql_execute() - altered the function to not catch the mysql output in
          in an environment variable.  This removes the risk of large result sets
          crashing the shell and allows callers more flexibility.
      
          mysql_version() - now returns exit value of its call to mysql_execute.
      
          mysql_version_printf() - deleted this function.
      
      src/bin/admin/kea-admin.in
      
          Removed the use of $_RESULT env variable formerly set by mysql_execute
      
          Replaced use of mysql_version_printf with appropriately structured
          calls to mysql_version
      
          Check_file_overwrite () - utility function for prompting the user that
          a given file will be overwritten
      
          get_dump_qry()  - new function which fetches the lease dump  SQL text
          specific to a given backend, version, and protocol from a file
      
          mysql_dump()
              - Updated to use get_dump_qry() to fetch the needed SQL
              - Restructured to use a temp file rather than pipe to eliminate
              use of PIPESTATUS
      
          pgsql_dump()
              Updated to get_dump_qry() to fetch the needed SQL
              Removed use of PIPESTATUS (didn't need it anyway)
      
      src/bin/admin/scripts/mysql/upgrade_1.0_to_2.0.sh.in
          Updated calls to mysql_version
      
      Added the following files which contain lease-dump SQL text:
          src/bin/admin/scripts/mysql/lease_dump_1.0.sh
          src/bin/admin/scripts/mysql/lease_dump_2.0.sh
          src/bin/admin/scripts/pgsql/lease_dump_1.0.sh
      19221f4a
  23. 09 Jun, 2015 40 commits
  24. 08 Jun, 2015 40 commits
  25. 28 May, 2015 40 commits
    • Thomas Markwalder's avatar
      [3883] Added support for PostgreSQL to kea-admin · 094d49f6
      Thomas Markwalder authored
      configure.ac
          - added src/bin/admin/tests/pgsql_tests.sh to list of config
          generated files (i.e AC_CONFIG_FILES)
      
      src/bin/admin/tests/pgsql_tests.sh.in
          - new file containing unit tests of for kea-admin PostgreSQL support
      
      src/bin/admin/tests/Makefile.am
          - added pgsql_tests.sh
      
      src/bin/admin/admin-utils.sh
          - added PosgreSQL support functions:
          pgsql_execute()
          pgsql_execute_script()
          pgsql_version()
          pgsql_version_print()
      
      src/bin/admin/kea-admin.in
          - implemented pgsql_init()
          - removed pgsql_version(), kea-admin uses function in
          admin-utils.sh directly
          - implemented pgsql_upgrade() - note that it fails with exit 1
          as there are not yet any upgrades available
      094d49f6
  26. 20 May, 2015 40 commits
  27. 08 Jan, 2015 40 commits
  28. 08 Dec, 2014 40 commits
    • Marcin Siodelski's avatar
      [3599] Fixed issues with the kea-admin script portability. · 8502a73c
      Marcin Siodelski authored
      The following issues causing failures on the FreeBSD were corrected:
      - Don't use sed to replace tabulations from the returned kea version.
      Instead the CONCAT mysql function is used.
      - Replace &>dev/null with the >/dev/null 2>&1
      
      Additional changes:
      - Added a new line before printing existing tables in the mysql.
      - Added .gitignore for new files.
      8502a73c
  29. 05 Dec, 2014 40 commits
    • Tomek Mrugalski's avatar
      [3599] Changes after review · 35357a30
      Tomek Mrugalski authored
       - mysql/upgrade_1.0_to_2.0.sh renamed to .in
       - header added to admin-utils.sh, revoked exec bit
       - kea-admin clarified (db => lease db)
       - kea-admin manpage corrected
       - lease6_hwaddr_source renamed to lease_hwaddr_source
       - mysql_tests are now working without installation
      35357a30