Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2022-04-01T17:05:38Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/2375Remove Cassandra from hammer2022-04-01T17:05:38ZFrancis DupontRemove Cassandra from hammerFollowup of #2116Followup of #2116kea2.1.5Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/2116Remove Cassandra code2022-03-31T14:33:13ZTomek MrugalskiRemove Cassandra codeThe Cassandra code has been deprecated in [1.9.9](https://gitlab.isc.org/isc-projects/kea/-/wikis/release%20notes/release-notes-1.9.9#incompatible-changes), which was later more broadly announced in [2.0.0](https://gitlab.isc.org/isc-pro...The Cassandra code has been deprecated in [1.9.9](https://gitlab.isc.org/isc-projects/kea/-/wikis/release%20notes/release-notes-1.9.9#incompatible-changes), which was later more broadly announced in [2.0.0](https://gitlab.isc.org/isc-projects/kea/-/wikis/release%20notes/release-notes-2.0.0#incompatible-changes).
The code should be removed sometime before 2.2.0 goes out the door.kea2.1.5Razvan BecheriuRazvan Becheriu2022-04-27https://gitlab.isc.org/isc-projects/kea/-/issues/1086implement CqlLeaseMgr getLeases6SubnetId and getLeases62022-03-31T08:29:36ZRazvan Becheriuimplement CqlLeaseMgr getLeases6SubnetId and getLeases6missing implementation for getLeases6SubnetId and getLeases6 in CqlLeaseMgrmissing implementation for getLeases6SubnetId and getLeases6 in CqlLeaseMgroutstandingRazvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/537fix memory leaks when trowing exceptions in cql_exchange2022-03-31T08:29:15ZRazvan Becheriufix memory leaks when trowing exceptions in cql_exchangeCurrently the CqlExchange::executeSelect function returns an AnyArray of dynamically allocated objects.
After each execution, the array is iterated and all objects are added to shared_pth objects.
If there is an exception thrown in the C...Currently the CqlExchange::executeSelect function returns an AnyArray of dynamically allocated objects.
After each execution, the array is iterated and all objects are added to shared_pth objects.
If there is an exception thrown in the CqlExchange::executeSelect function, the AnyArray vector is released causing memory leak because the stored pointers are never deleted.
This issue is resolved by github pull request:
https://github.com/isc-projects/kea/pull/112outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/427Investigate possiblity to get host reservations by subnet-id in Cassandra2021-10-27T09:15:38ZTomek MrugalskiInvestigate possiblity to get host reservations by subnet-id in Cassandra#313 implemented ability to retrieve all hosts in specific subnet. It offers two commands: reservation-get-all and reservation-get-page. Both are implemented for MySQL and PgSQL. However, there's a problem with Cassandra that it doesn't ...#313 implemented ability to retrieve all hosts in specific subnet. It offers two commands: reservation-get-all and reservation-get-page. Both are implemented for MySQL and PgSQL. However, there's a problem with Cassandra that it doesn't allow filtering on fields that are not primary keys.
This ticket is about finding out whether there's a reasonable way to implement those commands and either implement this or provide good justification (in a form of code comments) why it can't be done.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/74Confusing Cassandra error: executeMutation(): [applied] is false for statemen...2021-10-27T09:14:25ZGhost UserConfusing Cassandra error: executeMutation(): [applied] is false for statement INSERT_HOSTI tried to add the following host reservation:
```
{
"command": "reservation-add",
"arguments": {
"reservation":
{
"subnet-id":1,
"client-id": "01:0a:0b:0c:0d:0e:0f",
...I tried to add the following host reservation:
```
{
"command": "reservation-add",
"arguments": {
"reservation":
{
"subnet-id":1,
"client-id": "01:0a:0b:0c:0d:0e:0f",
"ip-address": "192.0.2.205",
"next-server": "192.0.2.1",
"server-hostname": "hal9000",
"boot-file-name": "/dev/null",
"option-data": [
{
"name": "domain-name-servers",
"data": "10.1.1.202,10.1.1.203"
},
{
"name": "domain-name-servers",
"data": "10.1.1.202,10.1.1.203"
}
],
"client-classes": [ "isc", "office" ]
}
}
}
```
and got this confusing error message:
```
{ "result": 1, "text": "CqlExchange::executeMutation(): [applied] is false for statement INSERT_HOST" }
```
This error is caused by the fact there is duplicated option (the same option defined twice). Normal user has no chance to understand this error message. It should be more descriptive.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/1892Deprecate Cassandra2021-07-28T12:58:34ZTomek MrugalskiDeprecate CassandraCassandra backend is by far the least popular and it is lagging behind. We looked at it and determined that it's not feasible to provide config backend implementation based on Cassandra.
For those two reasons, we're going to deprecate C...Cassandra backend is by far the least popular and it is lagging behind. We looked at it and determined that it's not feasible to provide config backend implementation based on Cassandra.
For those two reasons, we're going to deprecate Cassandra.
Cassandra will remain available in 2.x, but will be marked as deprecated. We will keep the code around as long as there are customers who still use it.kea1.9.9Tomek MrugalskiTomek Mrugalskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1616fix cql.update_hosts_test disabled test2020-12-18T10:34:02ZRazvan Becheriufix cql.update_hosts_test disabled testkea1.9.4Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/692whitespace in db password doesn't work and gets logged2020-12-11T20:12:01ZGhost Userwhitespace in db password doesn't work and gets logged**Describe the bug**
If a (postgresql, possibly other db) password specified in kea-dhcp4.conf contains whitespace, it causes the config processing to fail and the password to be logged unredacted.
**To Reproduce**
Steps to reproduce ...**Describe the bug**
If a (postgresql, possibly other db) password specified in kea-dhcp4.conf contains whitespace, it causes the config processing to fail and the password to be logged unredacted.
**To Reproduce**
Steps to reproduce the behavior:
1. Configure a database user for the kea database with a password containing whitespace - e.g. "foo bar":
2. Run Kea dhcpv4 with the following hosts-database in the config:
`"hosts-database": {
"type": "postgresql",
"host": "localhost",
"name": "kea",
"user": "kea",
"password": "foo bar"
}`
3. Examine logs, find errors like these:
ERROR [kea-dhcp4.database] DATABASE_INVALID_ACCESS invalid database access string: host=localhost name=kea password=foo bar type=postgresql user=kea universe=4
ERROR [kea-dhcp4.dhcp4/17119] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /etc/kea/kea-dhcp4.conf, reason: Unable to open database: Cannot parse bar, expected format is name=value
**Expected behavior**
The server should start up just as it does when both the password configured for the database user and the password
**Environment:**
- Kea version: 1.5.0, compiled myself from the version released in Debian Sid
- OS: Debian Stretch
- Compiled as determined by the Debian Sid package, at least with postgresql support.
**Additional Information**
I think the problem happens because [DbAccessParser::getDbAccessString() const](https://gitlab.isc.org/isc-projects/kea/blob/master/src/lib/database/dbaccess_parser.cc#L232) does not do anything like quoting when serializing the values of the ParameterMap, so when the string gets reparsed confusion ensues. As hinted by [this comment in process::ConfigControlParser::parse(...)](https://gitlab.isc.org/isc-projects/kea/blob/master/src/lib/process/config_ctl_parser.cc#L39), perhaps it's not necessary to serialize the ParameterMap into a string at all.kea1.9.3Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1579Backport #802: CQL cass_cluster_set_reconnect_wait_time is now deprecated2020-11-28T09:06:03ZFrancis DupontBackport #802: CQL cass_cluster_set_reconnect_wait_time is now deprecatedkea1.8.2Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/802CQL: cass_cluster_set_reconnect_wait_time is now deprecated2020-11-27T10:00:40ZFrancis DupontCQL: cass_cluster_set_reconnect_wait_time is now deprecatedWith cpp driver 2.13.0 I got:
```
cql_connection.cc:265:9: error: 'cass_cluster_set_reconnect_wait_time' is deprecated [-Werror,-Wdeprecated-declarations]
cass_cluster_set_reconnect_wait_time(cluster_,
^
/usr/local/includ...With cpp driver 2.13.0 I got:
```
cql_connection.cc:265:9: error: 'cass_cluster_set_reconnect_wait_time' is deprecated [-Werror,-Wdeprecated-declarations]
cass_cluster_set_reconnect_wait_time(cluster_,
^
/usr/local/include/cassandra.h:1746:13: note: 'cass_cluster_set_reconnect_wait_time' has been explicitly marked deprecated here
CASS_EXPORT CASS_DEPRECATED(void
^
/usr/local/include/cassandra.h:42:53: note: expanded from macro 'CASS_DEPRECATED'
# define CASS_DEPRECATED(func) func __attribute__((deprecated))
^
1 error generated.
```
Easy to handle but should be before the release...kea1.9.0Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1399update to latest cpp-driver2020-11-09T14:29:33ZTomek Mrugalskiupdate to latest cpp-driverAs of time of creating this issue, the latest release was 2.15.3. Before doing any work, please take a look at the state of the project: https://github.com/datastax/cpp-driver. There's a worrisome note about the c/c++ driver being in mai...As of time of creating this issue, the latest release was 2.15.3. Before doing any work, please take a look at the state of the project: https://github.com/datastax/cpp-driver. There's a worrisome note about the c/c++ driver being in maintenance mode. Does it mean that Cassandra no longer cares about C++? Are there better alternatives? Maybe latest Cassandra supports C++ out of the box?
Also, the [ARM Section 3.5.3](https://kea.readthedocs.io/en/kea-1.6.3/arm/install.html#building-with-cql-cassandra-support) has outdated installation instructions that mention 2016. If they're still correct, we should bump the date. Also, update it as necessary.kea1.9.0https://gitlab.isc.org/isc-projects/kea/-/issues/1069fix crashing unittests on no op database actions (scylladb currently is no op...2020-07-07T15:26:19ZRazvan Becheriufix crashing unittests on no op database actions (scylladb currently is no op on all mutations with cas)while investigating compatibility with scylladb, unittests were crashingwhile investigating compatibility with scylladb, unittests were crashingkea1.7.10Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/98CB: Implement CQLConfigBackendDHCPv62019-09-07T03:18:59ZMarcin SiodelskiCB: Implement CQLConfigBackendDHCPv6The CQLConfigBackendDHCPv6 class implements Config Backend for Cassandra as described in https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-designThe CQLConfigBackendDHCPv6 class implements Config Backend for Cassandra as described in https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-designkea1.7.0https://gitlab.isc.org/isc-projects/kea/-/issues/97CB: Implement CQLConfigBackendDHCPv42019-09-07T03:18:59ZMarcin SiodelskiCB: Implement CQLConfigBackendDHCPv4The CQLConfigBackendDHCPv4 class implements Config Backend for Cassandra as described in https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-designThe CQLConfigBackendDHCPv4 class implements Config Backend for Cassandra as described in https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-designkea1.7.0https://gitlab.isc.org/isc-projects/kea/-/issues/91CB: Create schema and upgrade scripts for Cassandra2019-09-07T03:18:59ZMarcin SiodelskiCB: Create schema and upgrade scripts for CassandraThis ticket covers updating Cassandra schema to facilitate Config Backend feature for 1.5.0 release:
https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#cassandra
I adds new tables, scripts and upgrade scri...This ticket covers updating Cassandra schema to facilitate Config Backend feature for 1.5.0 release:
https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#cassandra
I adds new tables, scripts and upgrade scripts to Cassandra.kea1.7.0https://gitlab.isc.org/isc-projects/kea/-/issues/523fix_build_sysrepo2019-05-30T08:40:28ZRazvan Becheriufix_build_sysrepoKea1.6Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/626yang tests fail on cassandra example config2019-05-23T15:26:04ZWlodzimierz Wencelyang tests fail on cassandra example configas title state:
```
[ RUN ] ConfigTest.examples4
Testing file /home/wlodek/dev/kea/doc/examples/kea4/advanced.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/all-keys-stable.json
Testing file /home/wlodek/dev/kea/doc/exampl...as title state:
```
[ RUN ] ConfigTest.examples4
Testing file /home/wlodek/dev/kea/doc/examples/kea4/advanced.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/all-keys-stable.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/backends.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/cassandra.json
Expected:
{
"Dhcp4": {
"interfaces-config": {
"interfaces": [ "ethX" ]
},
"lease-database": {
"connect-timeout": 5000,
"consistency": "quorum",
"contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
"keyspace": "keatest",
"port": 9042,
"reconnect-wait-time": 2000,
"request-timeout": 12000,
"serial-consistency": "serial",
"tcp-keepalive": 1200,
"tcp-nodelay": true,
"type": "cql"
},
"subnet4": [
{
"id": 1,
"interface": "ethX",
"pools": [
{
"pool": "192.0.2.1 - 192.0.2.200"
}
],
"subnet": "192.0.2.0/24"
}
],
"valid-lifetime": 4000
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "stdout"
}
],
"severity": "INFO"
}
]
}
}
Actual:
{
"Dhcp4": {
"interfaces-config": {
"interfaces": [ "ethX" ]
},
"lease-database": {
"connect-timeout": 5000,
"contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
"keyspace": "keatest",
"port": 9042,
"reconnect-wait-time": 2000,
"request-timeout": 12000,
"tcp-keepalive": 1200,
"tcp-nodelay": true,
"type": "cql"
},
"subnet4": [
{
"id": 1,
"interface": "ethX",
"pools": [
{
"pool": "192.0.2.1 - 192.0.2.200"
}
],
"subnet": "192.0.2.0/24"
}
],
"valid-lifetime": 4000
},
"Logging": {
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "stdout"
}
],
"severity": "INFO"
}
]
}
}
Diff:
@@ -6,5 @@
"lease-database": {
"connect-timeout": 5000,
- "consistency": "quorum",
"contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
"keyspace": "keatest",
@@ -12,5 @@
"reconnect-wait-time": 2000,
"request-timeout": 12000,
- "serial-consistency": "serial",
"tcp-keepalive": 1200,
"tcp-nodelay": true,
config_unittests.cc:357: Failure
Value of: verify(json)
Actual: false
Expected: true
Testing file /home/wlodek/dev/kea/doc/examples/kea4/classify.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/classify2.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/comments.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/dhcpv4-over-dhcpv6.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/global-reservations.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/hooks.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/leases-expiration.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/multiple-options.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/mysql-reservations.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/pgsql-reservations.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/reservations.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/several-subnets.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/shared-network.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/single-subnet.json
Testing file /home/wlodek/dev/kea/doc/examples/kea4/with-ddns.json
[ FAILED ] ConfigTest.examples4 (1051 ms)
[ RUN ] ConfigTest.examples6
Testing file /home/wlodek/dev/kea/doc/examples/kea6/advanced.json
Testing file /home/wlodek/dev/kea/doc/examples/kea6/all-keys-stable.json
Testing file /home/wlodek/dev/kea/doc/examples/kea6/backends.json
Testing file /home/wlodek/dev/kea/doc/examples/kea6/cassandra.json
Expected:
{
"Dhcp6": {
"interfaces-config": {
"interfaces": [ "ethX" ]
},
"lease-database": {
"connect-timeout": 5000,
"consistency": "quorum",
"contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
"keyspace": "keatest",
"port": 9042,
"reconnect-wait-time": 2000,
"request-timeout": 12000,
"serial-consistency": "serial",
"tcp-keepalive": 1200,
"tcp-nodelay": true,
"type": "cql"
},
"preferred-lifetime": 3000,
"rebind-timer": 2000,
"renew-timer": 1000,
"subnet6": [
{
"id": 1,
"interface": "ethX",
"pools": [
{
"pool": "2001:db8:1::/80"
}
],
"subnet": "2001:db8:1::/64"
}
],
"valid-lifetime": 4000
},
"Logging": {
"loggers": [
{
"debuglevel": 0,
"name": "kea-dhcp6",
"output_options": [
{
"output": "stdout"
}
],
"severity": "INFO"
}
]
}
}
Actual:
{
"Dhcp6": {
"interfaces-config": {
"interfaces": [ "ethX" ]
},
"lease-database": {
"connect-timeout": 5000,
"contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
"keyspace": "keatest",
"port": 9042,
"reconnect-wait-time": 2000,
"request-timeout": 12000,
"tcp-keepalive": 1200,
"tcp-nodelay": true,
"type": "cql"
},
"preferred-lifetime": 3000,
"rebind-timer": 2000,
"renew-timer": 1000,
"subnet6": [
{
"id": 1,
"interface": "ethX",
"pools": [
{
"pool": "2001:db8:1::/80"
}
],
"subnet": "2001:db8:1::/64"
}
],
"valid-lifetime": 4000
},
"Logging": {
"loggers": [
{
"debuglevel": 0,
"name": "kea-dhcp6",
"output_options": [
{
"output": "stdout"
}
],
"severity": "INFO"
}
]
}
}
Diff:
@@ -6,5 @@
"lease-database": {
"connect-timeout": 5000,
- "consistency": "quorum",
"contact-points": "192.0.2.1,192.0.2.2,192.0.2.3",
"keyspace": "keatest",
@@ -12,5 @@
"reconnect-wait-time": 2000,
"request-timeout": 12000,
- "serial-consistency": "serial",
"tcp-keepalive": 1200,
"tcp-nodelay": true,
config_unittests.cc:399: Failure
Value of: verify(json)
Actual: false
Expected: true
```
```
Sysrepo:
SYSREPO_VERSION: 0.7.5
SYSREPO_CPPFLAGS: -I/usr/local/include
SYSREPO_LIBS: -L/usr/local/lib -lsysrepo -L/usr/local/lib -lSysrepo-cpp
SYSREPO_REPO: /opt/sysrepo-0.7.5/build/repository
```
```
Kea source configure results:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Package:
Name: kea
Version: 1.5.0-git
Extended version: 1.5.0-git (git 8f1fb501d6e307d8f878bdbee5cf574ecf0a4c2f)
```Wlodzimierz WencelWlodzimierz Wencelhttps://gitlab.isc.org/isc-projects/kea/-/issues/511Return a list of all reservations by subnet ID - #313 for Cassandra back-end ...2019-05-22T16:59:20ZCathy AlmondReturn a list of all reservations by subnet ID - #313 for Cassandra back-end (if possible)This is a follow-on request from GL #313 - which was not implemented for Cassandra database back-end due to the technical challenges, described as:
In #313, the idea about paging is to reduce the communication:
- with SQL database you ...This is a follow-on request from GL #313 - which was not implemented for Cassandra database back-end due to the technical challenges, described as:
In #313, the idea about paging is to reduce the communication:
- with SQL database you can ask a page of the whole result from the DB: the kea-server will translate this page to JSON and sends to the requestor.
- with Cassandra you do not have this so you can get the whole result and page it in the kea-sever, etc.
To summarise, what matters is where the paging is done. In #313 we decided to do it only in the DB (so only for SQL DBs).
This ticket is to explore what we could to meet the use-case need (similarly or differently) with the Cassandra back-endKea1.6Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/115config-get API call returns error with some Cassandra backend options [ISC-su...2019-05-16T12:24:30ZBrian Conryconfig-get API call returns error with some Cassandra backend options [ISC-support #13375]I was unable to find an existing gitlab issue for Trac ticket 5710, so this is created to be it.
--- original details
When Kea is configured with a Cassandra backend, an error is returned on a config-get API call. I believe it is doing...I was unable to find an existing gitlab issue for Trac ticket 5710, so this is created to be it.
--- original details
When Kea is configured with a Cassandra backend, an error is returned on a config-get API call. I believe it is doing some config validation which is unaware of some DB options. Using the following lease configuration:
```json
"lease-database": {
"type": "cql",
"keyspace": "kea",
"contact-points": "127.0.0.1",
"port": 9042,
"tcp-keepalive": 1,
"tcp-nodelay": true,
"connect-timeout": 5000,
"max-reconnect-tries": 5,
"reconnect-wait-time": 2000
},
```
Here is the curl output of config-get:
```sh
$ curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-get", "service": [ "dhcp4" ] }' http://localhost:8080/
[ { "result": 1, "text": "Error during command processing: unknown DB access parameter: max-reconnect-tries=5" } ]
```
If I remove max-connect-retries, it gives the same error for reconnect-wait-time. Removing that results in the same error for tcp-keepalive, then tcp-nodelay.
Once the configuration has those options removed:
```json
"lease-database": {
"type": "cql",
"keyspace": "kea",
"contact-points": "127.0.0.1",
"port": 9042,
//"tcp-keepalive": 1,
//"tcp-nodelay": true,
"connect-timeout": 5000
//"max-reconnect-tries": 5,
//"reconnect-wait-time": 2000
},
```
The config-get call works:
```sh
$ curl -X POST -H "Content-Type: application/json" -d '{ "command": "config-get", "service": [ "dhcp4" ] }' http://localhost:8080/
[ { "arguments": { "Dhcp4": { "client-classes": [ { "boot-file-name": "/dev/null", "name": "voip", "next-server": "192.0.2.254", "option-data": [ ], "option-def": [ ], "server-hostname": "hal", ...
```Kea1.5-beta1