Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kea config tool and server configuration in database backend #81

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
ab57596
added kea config tool functionality
May 24, 2018
1d378c5
removed defines
May 24, 2018
dba34e8
fixed compilation
May 24, 2018
b6a9391
minor changes
May 25, 2018
153a9eb
minor changes
May 25, 2018
1c62e8c
minor changes
May 25, 2018
71ff1f1
minor changes
May 25, 2018
7b2bf0c
minor changes
May 25, 2018
03d7eb6
minor changes
May 25, 2018
a580e06
fixed unit tests
May 29, 2018
96ee8ae
fixed unit tests
May 29, 2018
0fdeed0
Merge remote-tracking branch 'isc-kea/master' into kea_config_tool
Jun 5, 2018
08f81ba
minor changes
Jun 5, 2018
7797cd5
fixed typo
Jun 5, 2018
81c29de
minor changes
Jun 11, 2018
dd4327b
save credentials on shard operations
Jun 14, 2018
f71d354
fixed bug when iterating through shards
Jun 14, 2018
2fdb676
reset configuration for each shard
Jun 14, 2018
b32355d
allow zero servers to be configured in master database
Jun 15, 2018
7e9b3ca
Merge remote-tracking branch 'isc-kea/master' into kea_config_tool
Jun 16, 2018
0687de0
updated create database and users
Jun 18, 2018
f60b088
Merge branch 'kea_config_tool' of https://github.com/razvan-becheriu/…
Jun 18, 2018
3664601
fixed merge
Jun 28, 2018
7cf39d0
fixed missing file
Jun 29, 2018
b0a1e88
fixed password for user keatest
Jun 29, 2018
a9d8a40
updated initial config
Jun 29, 2018
3562176
updated initial config
Jun 29, 2018
f0e653f
updated initial config
Jun 29, 2018
7dffe05
added more examples
Jun 29, 2018
3750532
updated configuration
Jun 29, 2018
6450149
added files to makefile
Jun 29, 2018
a640ced
Merge remote-tracking branch 'isc-kea/master' into kea_config_tool
Jul 4, 2018
189ba84
added missing configuration
Jul 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ config.h.in~
/test-driver
/ylwrap

/.cproject
/.project
/.vscode
/all.info
/coverage-cpp-html
/dns++.pc
/local.zone.sqlite3
/logger_lockfile
/report.info

*.tmp
*parser.dot
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ endif
--output report.info; \
sed --in-place --expression "s|$(abs_top_srcdir)|$(abs_top_builddir)|g" report.info; \
"$(GENHTML)" --frames --show-details --title 'Kea code coverage report' --legend \
--function-coverage --ignore-errors source --demangle-cpp \
--output "$(OVERALL_COVERAGE_DIR)" report.info; \
--function-coverage --ignore-errors source --demangle-cpp \
--output "$(OVERALL_COVERAGE_DIR)" report.info; \
printf "Generated C++ code coverage report in HTML at %s.\n" "$(OVERALL_COVERAGE_DIR)"; \
else \
echo "C++ code coverage not enabled at configuration time." ; \
Expand Down
38 changes: 24 additions & 14 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ AC_SUBST(SEP)
# If cross compiling assume the message compiler executable was
# magically already in place...
if test "$cross_compiling" = "yes"; then
AC_MSG_CHECKING("build (vs. host) compiled message compiler")
if test -x "${srcdir}/src/lib/log/compiler/message"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_WARN("you must install a message compiler in:")
AC_MSG_WARN(" ${srcdir}/src/lib/log/compiler/message")
AC_MSG_WARN("compiled for build ($build).")
fi
AC_MSG_CHECKING("build (vs. host) compiled message compiler")
if test -x "${srcdir}/src/lib/log/compiler/message"; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
AC_MSG_WARN("you must install a message compiler in:")
AC_MSG_WARN(" ${srcdir}/src/lib/log/compiler/message")
AC_MSG_WARN("compiled for build ($build).")
fi
fi
AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = "yes"])

Expand Down Expand Up @@ -410,7 +410,7 @@ case "$host" in
;;
esac
if [ test $kea_undefined_pthread_behavior = "yes" ]; then
AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?])
AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?])
fi

# Our experiments have shown Solaris 10 has broken support for the
Expand Down Expand Up @@ -816,7 +816,7 @@ if test "$CQL_CONFIG" != "" ; then

CQL_INCLUDEDIR=`$CQL_CONFIG --cflags-only-I $cql_lib`
CQL_CPPFLAGS="`$CQL_CONFIG --cflags-only-other $cql_lib` $CQL_INCLUDEDIR"
CQL_LIBS="`$CQL_CONFIG --libs $cql_lib`"
CQL_LIBS="`$CQL_CONFIG --libs $cql_lib`"
CQL_VERSION=`$CQL_CONFIG --modversion $cql_lib`

AC_SUBST(CQL_CPPFLAGS)
Expand Down Expand Up @@ -1403,6 +1403,8 @@ AC_CONFIG_FILES([Makefile
src/bin/perfdhcp/Makefile
src/bin/perfdhcp/tests/Makefile
src/bin/perfdhcp/tests/testdata/Makefile
src/bin/kea_config_tool/Makefile
src/bin/kea_config_tool/tests/Makefile
src/bin/shell/Makefile
src/bin/shell/kea-shell
src/bin/shell/tests/Makefile
Expand Down Expand Up @@ -1492,6 +1494,8 @@ AC_CONFIG_FILES([Makefile
src/share/database/scripts/Makefile
src/share/database/scripts/cql/Makefile
src/share/database/scripts/cql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/cql/config_upgrade_0.0_to_1.0.sh
src/share/database/scripts/cql/master_upgrade_0.0_to_1.0.sh
src/share/database/scripts/mysql/Makefile
src/share/database/scripts/mysql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/mysql/upgrade_2.0_to_3.0.sh
Expand All @@ -1501,13 +1505,17 @@ AC_CONFIG_FILES([Makefile
src/share/database/scripts/mysql/upgrade_5.0_to_5.1.sh
src/share/database/scripts/mysql/upgrade_5.1_to_5.2.sh
src/share/database/scripts/mysql/upgrade_5.2_to_6.0.sh
src/share/database/scripts/mysql/config_upgrade_0.0_to_1.0.sh
src/share/database/scripts/mysql/master_upgrade_0.0_to_1.0.sh
src/share/database/scripts/pgsql/Makefile
src/share/database/scripts/pgsql/upgrade_1.0_to_2.0.sh
src/share/database/scripts/pgsql/upgrade_2.0_to_3.0.sh
src/share/database/scripts/pgsql/upgrade_3.0_to_3.1.sh
src/share/database/scripts/pgsql/upgrade_3.1_to_3.2.sh
src/share/database/scripts/pgsql/upgrade_3.2_to_3.3.sh
src/share/database/scripts/pgsql/upgrade_3.3_to_4.0.sh
src/share/database/scripts/pgsql/config_upgrade_0.0_to_1.0.sh
src/share/database/scripts/pgsql/master_upgrade_0.0_to_1.0.sh
tools/Makefile
tools/path_replacer.sh
])
Expand Down Expand Up @@ -1672,9 +1680,9 @@ if test "$CQL_CPPFLAGS" != "" ; then
cat >> config.report << END

Cassandra CQL:
CQL_VERSION: ${CQL_VERSION}
CQL_CPPFLAGS: ${CQL_CPPFLAGS}
CQL_LIBS: ${CQL_LIBS}
CQL_VERSION: ${CQL_VERSION}
CQL_CPPFLAGS: ${CQL_CPPFLAGS}
CQL_LIBS: ${CQL_LIBS}
END
else
cat >> config.report << END
Expand All @@ -1696,6 +1704,7 @@ Google Test:
END
else
cat >> config.report << END

Google Test:
no
END
Expand All @@ -1714,6 +1723,7 @@ Google Benchmark:
END
else
cat >> config.report << END

Google Benchmark:
no
END
Expand Down
3 changes: 2 additions & 1 deletion doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/version.ent
html
/html
/latex
42 changes: 42 additions & 0 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,48 @@ nobase_dist_doc_DATA += examples/kea6/simple.json
nobase_dist_doc_DATA += examples/kea6/softwire46.json
nobase_dist_doc_DATA += examples/kea6/stateless.json
nobase_dist_doc_DATA += examples/kea6/with-ddns.json
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea4/kea4-master-mysql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea4/kea4-master-pgsql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea4/kea4-master-cql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea4/kea4-shard-mysql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea4/kea4-shard-pgsql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea4/kea4-shard-cql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea6/kea6-master-mysql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea6/kea6-master-pgsql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea6/kea6-master-cql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea6/kea6-shard-mysql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea6/kea6-shard-pgsql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/local/kea6/kea6-shard-cql.conf
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea4/kea_shard/config.generic
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea4/kea_shard/config.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea4/kea_shard/servers.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea4/kea_shard/credentials.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea6/kea_shard/config.generic
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea6/kea_shard/config.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea6/kea_shard/servers.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-mysql/kea6/kea_shard/credentials.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea4/kea_shard/config.generic
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea4/kea_shard/config.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea4/kea_shard/servers.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea4/kea_shard/credentials.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea6/kea_shard/config.generic
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea6/kea_shard/config.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea6/kea_shard/servers.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-pgsql/kea6/kea_shard/credentials.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea4/kea_shard/config.generic
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea4/kea_shard/config.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea4/kea_shard/servers.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea4/kea_shard/credentials.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea6/kea_shard/config.generic
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea6/kea_shard/config.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea6/kea_shard/servers.json
nobase_dist_doc_DATA += examples/kea-config-tool/initial-config-cql/kea6/kea_shard/credentials.json
nobase_dist_doc_DATA += examples/kea-config-tool/master-db-connect-mysql.ini
nobase_dist_doc_DATA += examples/kea-config-tool/master-db-connect-pgsql.ini
nobase_dist_doc_DATA += examples/kea-config-tool/master-db-connect-cql.ini
nobase_dist_doc_DATA += examples/kea-config-tool/shard-db-connect-mysql.ini
nobase_dist_doc_DATA += examples/kea-config-tool/shard-db-connect-pgsql.ini
nobase_dist_doc_DATA += examples/kea-config-tool/shard-db-connect-cql.ini

devel:
mkdir -p html
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#####################################################
############### FOR FUTURE USE #####################
#####################################################
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"Dhcp4": {
"lease-database": {
"contact-points": "127.0.0.1",
"keyspace": "kea_shard",
"max-statement-tries": 1,
"password": "keatest",
"type": "cql",
"user": "keatest"
},
"expired-leases-processing": {
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"reclaim-timer-wait-time": 10,
"unwarned-reclaim-cycles": 5
},
"valid-lifetime": 40,
"renew-timer": 10,
"subnet4": [
{
"subnet": "192.0.2.0/24",
"pools": [
{
"pool": "192.0.2.16 - 192.0.2.128"
}
],
"relay": {
"ip-address": "192.0.2.1"
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"config-database": {
"user": "keatest",
"type": "cql",
"password": "keatest",
"keyspace": "kea_shard",
"contact-points": "127.0.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"config-database": {
"user": "keatest",
"type": "cql",
"password": "keatest",
"keyspace": "kea_shard",
"contact-points": "127.0.0.1"
},
"master-config": [
{
"instance-id": "kea-dhcp4-server",
"server-config": {
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"ens4"
]
}
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "/var/log/kea-dhcp4.log"
}
],
"severity": "DEBUG",
"debuglevel": 99
}
]
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#####################################################
############### FOR FUTURE USE #####################
#####################################################
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"Dhcp6": {
"server-id": {
"htype": 1,
"identifier": "56847afe6699",
"time": 512640186,
"type": "LLT"
},
"lease-database": {
"contact-points": "127.0.0.1",
"keyspace": "kea_shard",
"max-statement-tries": 1,
"password": "keatest",
"type": "cql",
"user": "keatest"
},
"expired-leases-processing": {
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"reclaim-timer-wait-time": 10,
"unwarned-reclaim-cycles": 5
},
"preferred-lifetime": 30,
"valid-lifetime": 40,
"renew-timer": 10,
"rebind-timer": 20,
"subnet6": [
{
"subnet": "3001:db8:1::/48",
"pools": [
{
"pool": "3001:db8:1::/80"
}
],
"pd-pools": [
{
"prefix": "3001:db8:1:1::",
"prefix-len": 80,
"delegated-len": 96
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"config-database": {
"user": "keatest",
"type": "cql",
"password": "keatest",
"keyspace": "kea_shard",
"contact-points": "127.0.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"config-database": {
"user": "keatest",
"type": "cql",
"password": "keatest",
"keyspace": "kea_shard",
"contact-points": "127.0.0.1"
},
"master-config": [
{
"instance-id": "kea-dhcp6-server",
"server-config": {
"Dhcp6": {
"interfaces-config": {
"interfaces": [
"ens4/2001:db8:1::1"
]
}
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp6",
"output_options": [
{
"output": "/var/log/kea-dhcp6.log"
}
],
"severity": "DEBUG",
"debuglevel": 99
}
]
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#####################################################
############### FOR FUTURE USE #####################
#####################################################
Loading