Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2020-06-15T15:41:19Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/1100Remove conversion from user-context to comments2020-06-15T15:41:19ZTomek MrugalskiRemove conversion from user-context to comments#1079 explained the relationship between comments and user-context. Right now we load comments and convert them to user-context on the fly. When storing configuration (config-get, config-write and similar), we convert them back. There wa...#1079 explained the relationship between comments and user-context. Right now we load comments and convert them to user-context on the fly. When storing configuration (config-get, config-write and similar), we convert them back. There was a complaint about that - see #1006. This ticket is for removing the conversion from user-context to comments.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1147race avoidance, remove MultiThreadingCriticalSection RAII instances from Leas...2020-05-28T17:41:54ZThomas Markwalderrace avoidance, remove MultiThreadingCriticalSection RAII instances from Lease Commands Hook libraryWe need to look at removing use of MultiThreadingCriticalSection instances in Lease Commands hook library command handlers. Currently all of the commands which modify leases create an instance upon entry. This means packet threads will...We need to look at removing use of MultiThreadingCriticalSection instances in Lease Commands hook library command handlers. Currently all of the commands which modify leases create an instance upon entry. This means packet threads will be stopped and then recreated on every lease update, which has disconcerting implications for HA, especially in load-balancing pairs.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1169update release checklist gitlab issue template2020-06-19T08:36:40ZMichal Nowikowskiupdate release checklist gitlab issue templatekea1.7.9Michal NowikowskiMichal Nowikowskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1189config-backend-pull must use the current config2020-06-15T11:22:01ZFrancis Dupontconfig-backend-pull must use the current configdatabaseConfigFetch comment says:
> srv_cfg pointer to the staging configuration that should hold the config backends list and other partial configuration read from the file in case the method is called upon the server's start up. It is ...databaseConfigFetch comment says:
> srv_cfg pointer to the staging configuration that should hold the config backends list and other partial configuration read from the file in case the method is called upon the server's start up. It is a pointer to the current server configuration if the method is called to fetch configuration updates.
commandConfigBackendPullHandler code was copied from cbFetchUpdates which establishes the periodic update. The problem is that cbFetchUpdates puts the staging config in the closure before the config manager commit when the handler is called after so it should be fixed to use the current config.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1203make the forensic/legal logging hook compatible with multi-threading2020-06-14T16:19:30ZFrancis Dupontmake the forensic/legal logging hook compatible with multi-threadingTechnically this means to add a connection pool for MySQL and PostgreSQL backends.Technically this means to add a connection pool for MySQL and PostgreSQL backends.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1209update description of isc-kea-common package2020-06-19T15:01:11ZWlodzimierz Wencelupdate description of isc-kea-common packageAs @marcin pointed out during sanity checks:
` The description of the isc-kea-common package only says it provides the common libraries and doesn't mention hooks.`
Please update description.As @marcin pointed out during sanity checks:
` The description of the isc-kea-common package only says it provides the common libraries and doesn't mention hooks.`
Please update description.kea1.7.9https://gitlab.isc.org/isc-projects/kea/-/issues/1211Compilation warnings on Ubuntu 19.10/g++ 9.2.12020-06-15T15:46:01ZTomek MrugalskiCompilation warnings on Ubuntu 19.10/g++ 9.2.1There are several compilation warnings:
```
labelsequence_unittest.cc: In member function ‘virtual void {anonymous}::ExtendableLabelSequenceTest_extendableLabelSequence_Test::TestBody()’:
labelsequence_unittest.cc:998:33: warning: impli...There are several compilation warnings:
```
labelsequence_unittest.cc: In member function ‘virtual void {anonymous}::ExtendableLabelSequenceTest_extendableLabelSequence_Test::TestBody()’:
labelsequence_unittest.cc:998:33: warning: implicitly-declared ‘constexpr isc::dns::LabelSequence& isc::dns::LabelSequence::operator=(const isc::dns::LabelSequence&)’ is deprecated [-Wdeprecated-copy]
998 | els = LabelSequence(ls1, buf);
| ^
In file included from labelsequence_unittest.cc:11:
../../../../src/lib/dns/labelsequence.h:125:5: note: because ‘isc::dns::LabelSequence’ has user-provided ‘isc::dns::LabelSequence::LabelSequence(const isc::dns::LabelSequence&)’
125 | LabelSequence(const LabelSequence& ls):
| ^~~~~~~~~~~~~
```
(repeated many times throughout the file.
```
cfg_option_unittest.cc: In member function ‘virtual void {anonymous}::CfgOptionTest_replace_Test::TestBody()’:
cfg_option_unittest.cc:297:28: warning: implicitly-declared ‘isc::dhcp::OptionDescriptor& isc::dhcp::OptionDescriptor::operator=(const isc::dhcp::OptionDescriptor&)’ is deprecated [-Wdeprecated-copy]
297 | desc = cfg.get("isc", 2);
| ^
In file included from cfg_option_unittest.cc:17:
../../../../src/lib/dhcpsrv/cfg_option.h:104:5: note: because ‘isc::dhcp::OptionDescriptor’ has user-provided ‘isc::dhcp::OptionDescriptor::OptionDescriptor(const isc::dhcp::OptionDescriptor&)’
104 | OptionDescriptor(const OptionDescriptor& desc)
| ^~~~~~~~~~~~~~~~
```
This also affects client_class_def_unittest.cc, cfg_subnets4_unittest.cc, subnet_unittest.cc and config_backend_unittest.cc (and possibly more.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1232declineLease can lose updateLease race2020-06-11T13:35:09ZFrancis DupontdeclineLease can lose updateLease raceIn both dhcp4_src.cc and dhcp6_srv.cc the declineLease method calls updateLease with a try-catch block so when it loses a race the updateLease throws. The processPacket method catches the exception and emits a generic process failure log...In both dhcp4_src.cc and dhcp6_srv.cc the declineLease method calls updateLease with a try-catch block so when it loses a race the updateLease throws. The processPacket method catches the exception and emits a generic process failure log.
IMHO it is a minor bug easy to fix.
Related to multi-threading even it is not MT specific.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1234kea logs error every time command channel command is received2020-06-19T16:48:17ZWlodzimierz Wencelkea logs error every time command channel command is received1. setup is simple Kea4 + kea-ctrl-agent, configs at the bottom, important thing is that here I am sending commands on the same interface as dhcp traffic (in system tests we use separate networks)
2. send command via http to ctrl-agent, ...1. setup is simple Kea4 + kea-ctrl-agent, configs at the bottom, important thing is that here I am sending commands on the same interface as dhcp traffic (in system tests we use separate networks)
2. send command via http to ctrl-agent, logs:
```
May 14 15:59:16 ubuntu20-64-1 kea-ctrl-agent: INFO [kea-ctrl-agent.commands.140266868430400] COMMAND_RECEIVED Received command 'config-get'
May 14 15:59:16 ubuntu20-64-1 kea-ctrl-agent: INFO [kea-ctrl-agent.ctrl-agent.140266868430400] CTRL_AGENT_COMMAND_FORWARDED command config-get successfully forwarded to the service dhcp4
```
kea-dhcp4 logs:
```
2020-05-14 15:59:16.351 ERROR [kea-dhcp4.packets/6770.140286406021056] DHCP4_BUFFER_RECEIVE_FAIL error on attempt to receive packet: received data over unknown socket
2020-05-14 15:59:16.351 INFO [kea-dhcp4.commands/6770.140286406021056] COMMAND_RECEIVED Received command 'config-get'
```
4. commands actually works
```
[
{
"arguments": {
"Control-agent": {
"control-sockets": {
"dhcp4": {
"socket-name": "/tmp/control_socket",
"socket-type": "unix"
}
},
"hooks-libraries": [],
"http-host": "192.168.59.2",
"http-port": 8000,
"loggers": [
{
"debuglevel": 0,
"name": "kea-ctrl-agent",
"output_options": [
{
"flush": true,
"maxsize": 10240000,
"maxver": 1,
"output": "syslog",
"pattern": ""
}
],
"severity": "INFO"
}
]
}
},
"result": 0
}
```
```
[
{
"arguments": {
"Dhcp4": {
"authoritative": false,
"boot-file-name": "",
"calculate-tee-times": false,
"config-control": {
"config-databases": [
{
"name": "keatest",
"password": "keatest",
"type": "mysql",
"user": "keatest"
}
],
"config-fetch-wait-time": 0
},
"control-socket": {
"socket-name": "/tmp/control_socket",
"socket-type": "unix"
},
"ddns-generated-prefix": "myhost",
"ddns-override-client-update": false,
"ddns-override-no-update": false,
"ddns-qualifying-suffix": "",
"ddns-replace-client-name": "never",
"ddns-send-updates": true,
"decline-probation-period": 86400,
"dhcp-ddns": {
"enable-updates": false,
"max-queue-size": 1024,
"ncr-format": "JSON",
"ncr-protocol": "UDP",
"sender-ip": "0.0.0.0",
"sender-port": 0,
"server-ip": "127.0.0.1",
"server-port": 53001
},
"dhcp-queue-control": {
"capacity": 500,
"enable-queue": false,
"queue-type": "kea-ring4"
},
"dhcp4o6-port": 0,
"echo-client-id": true,
"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
},
"hooks-libraries": [
{
"library": "/home/wlodek/kea_bin/lib/kea/hooks/libdhcp_mysql_cb.so"
},
{
"library": "/home/wlodek/kea_bin/lib/kea/hooks/libdhcp_cb_cmds.so"
}
],
"host-reservation-identifiers": [
"hw-address",
"duid",
"circuit-id",
"client-id"
],
"hostname-char-replacement": "",
"hostname-char-set": "[^A-Za-z0-9.-]",
"interfaces-config": {
"interfaces": [
"enp0s8"
],
"re-detect": true
},
"lease-database": {
"type": "memfile"
},
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "stdout"
}
],
"severity": "DEBUG"
}
],
"match-client-id": true,
"multi-threading": {
"enable-multi-threading": false,
"packet-queue-size": 64,
"thread-pool-size": 0
},
"next-server": "0.0.0.0",
"option-data": [],
"option-def": [],
"reservation-mode": "all",
"sanity-checks": {
"lease-checks": "warn"
},
"server-hostname": "",
"server-tag": "abc",
"shared-networks": [],
"statistic-default-sample-age": 0,
"statistic-default-sample-count": 20,
"store-extended-info": false,
"subnet4": [],
"t1-percent": 0.5,
"t2-percent": 0.875,
"valid-lifetime": 7200
}
},
"result": 0
}
]
```kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1235Implement v6 Leasequery in Leasequery hook library2020-06-19T14:54:58ZThomas MarkwalderImplement v6 Leasequery in Leasequery hook libraryThis issue builds upon #978 which created the LeaseQuery hook library and implemented DHCP V4 LeaseQuery (per RFC 4388) and create the v6 implementation stubs. Originally #978 was to provide both, we split the effort so V4 can roll out f...This issue builds upon #978 which created the LeaseQuery hook library and implemented DHCP V4 LeaseQuery (per RFC 4388) and create the v6 implementation stubs. Originally #978 was to provide both, we split the effort so V4 can roll out first. This issue fills in the v6 Leasequery implementation.kea1.7.9Thomas MarkwalderThomas Markwalderhttps://gitlab.isc.org/isc-projects/kea/-/issues/1239TSAN reports that several HA components are not kea thread safe2020-06-16T09:06:27ZRazvan BecheriuTSAN reports that several HA components are not kea thread safereviewing #1219 I have discovered that HAService::asyncSendLeaseUpdate calls HttpClient::asyncSendRequest which is not thread safe.reviewing #1219 I have discovered that HAService::asyncSendLeaseUpdate calls HttpClient::asyncSendRequest which is not thread safe.kea1.7.9Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/1266isc::log::Logger is not thread safe2020-06-14T16:04:46ZRazvan Becheriuisc::log::Logger is not thread safecalling isc::log::Logger::getLoggerPtr is not thread safe and can lead to crashescalling isc::log::Logger::getLoggerPtr is not thread safe and can lead to crasheskea1.7.9Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/1244KB on How to upgrade/update Kea2020-06-24T21:55:20ZVicky Riskvicky@isc.orgKB on How to upgrade/update KeaWe would like a generic 'How to update your Kea server' with special instructions if the update includes a db schema change and special instructions for an HA pair. If there are any other special cases, include those.
Then in the releas...We would like a generic 'How to update your Kea server' with special instructions if the update includes a db schema change and special instructions for an HA pair. If there are any other special cases, include those.
Then in the release notes, we can tell them if they need to use one of these special cases (based on what the changes are in the release.)kea1.7.9Wlodzimierz WencelWlodzimierz Wencelhttps://gitlab.isc.org/isc-projects/kea/-/issues/1245convert parsing of global entries to flat style2020-06-18T20:13:11ZFrancis Dupontconvert parsing of global entries to flat styleIn json_config_parser.cc the loop parsing global entries incorrectly assumes entries are handled in the code order when they are in the alphabetic entry name order. The code must be converted into the flat style to enforce this property.In json_config_parser.cc the loop parsing global entries incorrectly assumes entries are handled in the code order when they are in the alphabetic entry name order. The code must be converted into the flat style to enforce this property.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1255ParkingLots must be Kea thread safe.2020-05-30T12:52:15ZFrancis DupontParkingLots must be Kea thread safe.Found by the thread sanitizer in https://gitlab.isc.org/isc-private/qa-dhcp/-/issues/213:
```
std::map<int, ParkingLotPtr> parking_lots_;
```
This map is obviously updated during packet processing by the HA code.Found by the thread sanitizer in https://gitlab.isc.org/isc-private/qa-dhcp/-/issues/213:
```
std::map<int, ParkingLotPtr> parking_lots_;
```
This map is obviously updated during packet processing by the HA code.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1256Last allocated time is not Kea thread safe.2020-06-12T15:00:43ZFrancis DupontLast allocated time is not Kea thread safe.Now the first race between setLastAllocated() called from pickAddressInternal (so inside a lock guard) and getPreferredSubnet() called by allocateUnreservedLeases6() in its second pass.
The key here is the "Preferred": in a shared netwo...Now the first race between setLastAllocated() called from pickAddressInternal (so inside a lock guard) and getPreferredSubnet() called by allocateUnreservedLeases6() in its second pass.
The key here is the "Preferred": in a shared network the getPreferredSubnet() routine returns the most recently used subnet using the last_allocated_time_ table which is of course updated with last_allocated_ia_ and co by setLastAllocated().
There is already a mutex so we should use it. It is currently private to the Allocator class member of AllocEngine so it requires some work.kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1261kea does not start in deb package for debian 92020-05-29T10:44:25ZMichal Nowikowskikea does not start in deb package for debian 9kea1.7.9Michal NowikowskiMichal Nowikowskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1262hammer: there are problems with checking installed packages2020-06-01T13:08:54ZMichal Nowikowskihammer: there are problems with checking installed packageskea1.7.9Michal NowikowskiMichal Nowikowskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1273log/tests build fails with log4cplus is not in default location2020-06-16T20:44:43ZThomas Markwalderlog/tests build fails with log4cplus is not in default locationIf you supply a path to log4cplus to configure:
```
configure ... --with-log4cplus=/opt/log4cplus/log4cplus-1.2.1-rc2/local ...
```
Compilation of src/log/test fails because:
```
lude -DOS_LINUX -Wall -Wextra -Wnon-virtual-dtor -Wwri...If you supply a path to log4cplus to configure:
```
configure ... --with-log4cplus=/opt/log4cplus/log4cplus-1.2.1-rc2/local ...
```
Compilation of src/log/test fails because:
```
lude -DOS_LINUX -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -g -O2 -fmax-errors=4 -MT logger_lock_test-logger_lock_test.o -MD -MP -MF .deps/logger_lock_test-logger_lock_test.Tpo -c -o logger_lock_test-logger_lock_test.o `test -f 'logger_lock_test.cc' || echo './'`logger_lock_test.cc
In file included from ../../../../src/lib/log/logger.h:17:0,
from ../../../../src/lib/log/macros.h:10,
from init_logger_test.cc:9:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
^
compilation terminated.
In file included from ../../../../src/lib/log/logger.h:17:0,
from ../../../../src/lib/log/macros.h:10,
from logger_lock_test.cc:9:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
^`
compilation terminated
In file included from ../../../../src/lib/log/logger.h:17:0,
from ../../../../src/lib/log/macros.h:10,
from buffer_logger_test.cc:9:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
^
compilation terminated.
make[6]: *** [init_logger_test-init_logger_test.o] Error 1
make[6]: *** Waiting for unfinished jobs....
make[6]: *** [logger_lock_test-logger_lock_test.o] Error 1
make[6]: *** [buffer_logger_test-buffer_logger_test.o] Error 1
In file included from ../../../../src/lib/log/logger.h:17:0,
from logger_example.cc:29:
../../../../src/lib/log/logger_impl.h:24:30: fatal error: log4cplus/logger.h: No such file or directory
#include <log4cplus/logger.h>
```
Apparently things shifted around and log4cplus includes are now needed to compile log/tests/*.cc.
Attached is a diff that allows it to build but may not be the most appropriate
[logmake.diff](/uploads/3989b0bfe4989962ae510f732689c582/logmake.diff)kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1276kea logs lease renew as prefix renew2020-06-19T07:11:57ZWlodzimierz Wencelkea logs lease renew as prefix renewIn my test I do not have pd configured anywhere, clients are not requesting this but on renew kea logs
```
INFO [kea-dhcp6.leases/195830.140468334618368] DHCP6_PD_LEASE_RENEW duid=[00:01:00:01:26:7d:fd:da:00:0c:01:02:04:72], tid=0x4deb:...In my test I do not have pd configured anywhere, clients are not requesting this but on renew kea logs
```
INFO [kea-dhcp6.leases/195830.140468334618368] DHCP6_PD_LEASE_RENEW duid=[00:01:00:01:26:7d:fd:da:00:0c:01:02:04:72], tid=0x4deb: lease for prefix 2001:db8:1::1aa/128 and iaid=1 has been allocated
```
isn't this message a bit confusing?kea1.7.9Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/1277HA service handling commands is not Kea thread safe2020-06-19T08:30:21ZRazvan BecheriuHA service handling commands is not Kea thread safekea1.7.9Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/1278Use a different file LOG_FILE in log_utils.h2020-06-19T13:58:52ZFrancis DupontUse a different file LOG_FILE in log_utils.hTitle explains everything!Title explains everything!kea1.7.9Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1287lib/hook version bump up for 1.7.92020-06-22T14:51:27ZWlodzimierz Wencellib/hook version bump up for 1.7.9kea1.7.9Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/1288pre release 1.7.9 changes2020-06-22T18:32:16ZWlodzimierz Wencelpre release 1.7.9 changeskea1.7.9Wlodzimierz WencelWlodzimierz Wencel