Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2020-07-27T17:52:05Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/1346bump up libs versions for 1.7.102020-07-27T17:52:05ZMichal Nowikowskibump up libs versions for 1.7.10kea1.7.10Thomas MarkwalderThomas Markwalderhttps://gitlab.isc.org/isc-projects/kea/-/issues/1344unpackRelayForwardMsg in lease_query_impl6_unittest.cc can overflow creating ...2020-07-27T08:49:59ZFrancis DupontunpackRelayForwardMsg in lease_query_impl6_unittest.cc can overflow creating an empty bufferThe problem is line 261 in the premium file and gives some crashes on some platforms.The problem is line 261 in the premium file and gives some crashes on some platforms.kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1341Release 1.7.10 changes2020-07-24T09:13:29ZMichal NowikowskiRelease 1.7.10 changeskea1.7.10Michal NowikowskiMichal Nowikowskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1337compilation of unit test fail on alpine 3.102020-07-23T16:40:40ZMichal Nowikowskicompilation of unit test fail on alpine 3.10https://jenkins.isc.org/job/kea-1.7/job/ut-basic/259/execution/node/163/log/
```
21:47:32.459 ccache c++ -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/lib -I../../../../src/lib -DTEST_DATA_BUILDDIR=\"/home/jenkins/workspace/kea...https://jenkins.isc.org/job/kea-1.7/job/ut-basic/259/execution/node/163/log/
```
21:47:32.459 ccache c++ -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/lib -I../../../../src/lib -DTEST_DATA_BUILDDIR=\"/home/jenkins/workspace/kea-1.7/ut-basic/src/lib/util/tests\" -DTEST_DATA_TOPBUILDDIR=\"/home/jenkins/workspace/kea-1.7/ut-basic\" -I/opt/googletest/googletest -I/opt/googletest/googletest/include -DOS_LINUX -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare -pthread -Wno-missing-field-initializers -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -MT run_unittests-qid_gen_unittest.o -MD -MP -MF .deps/run_unittests-qid_gen_unittest.Tpo -c -o run_unittests-qid_gen_unittest.o `test -f 'qid_gen_unittest.cc' || echo './'`qid_gen_unittest.cc
21:47:33.048 chrono_time_utils_unittest.cc: In member function 'virtual void ChronoTimeUtilsTest_epoch_Test::TestBody()':
21:47:33.048 chrono_time_utils_unittest.cc:29:21: error: 'timelocal' was not declared in this scope
21:47:33.048 time_t tepoch = timelocal(&epoch);
```kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1330Add a test mode to the interface configuration parser2020-07-27T08:51:32ZFrancis DupontAdd a test mode to the interface configuration parserSee https://gitlab.isc.org/isc-projects/kea/-/issues/1166#note_148112 for the reason.See https://gitlab.isc.org/isc-projects/kea/-/issues/1166#note_148112 for the reason.kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1321Change the answer type from ConstElementPtr to ElementPtr2020-07-20T13:20:14ZFrancis DupontChange the answer type from ConstElementPtr to ElementPtrThe idea is to ease an answer update, for instance adding service, transaction-id, extra message, etc.The idea is to ease an answer update, for instance adding service, transaction-id, extra message, etc.kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1314different pools based on class2020-07-15T08:23:34ZWlodzimierz Wenceldifferent pools based on classRelated: https://support.isc.org/Ticket/Display.html?id=16773
Scenario:
Kea configured with one subnet with two pools inside, one pool is "open" second is only for client that will be assigned to class "super-fun-clients". Class will be...Related: https://support.isc.org/Ticket/Display.html?id=16773
Scenario:
Kea configured with one subnet with two pools inside, one pool is "open" second is only for client that will be assigned to class "super-fun-clients". Class will be assigned via global reservation.
Problem:
I can't make it work, either all clients get all addresses or non of the clients are able to get "super-fun-clients" pool.
Example configuration (I tried more, but this one is, what I think, correct)
```
{
"Dhcp4": {
"client-classes": [
{
"name": "super-fun-clients",
"only-if-required": true
}
],
"hooks-libraries": [],
"interfaces-config": {
"interfaces": [
"enp0s9"
]
},
"lease-database": {
"type": "memfile"
},
"loggers": [
{
"debuglevel": 99,
"name": "kea-dhcp4",
"output_options": [
{
"output": "/home/wlodek/installed/git-thread/var/log/kea.log"
}
],
"severity": "DEBUG"
}
],
"multi-threading": {
"enable-multi-threading": true,
"packet-queue-size": 16,
"thread-pool-size": 2
},
"option-data": [],
"rebind-timer": 2000,
"renew-timer": 1000,
"reservations": [
{
"client-classes": [
"super-fun-clients"
],
"hw-address": "aa:bb:cc:dd:ee:ff"
}
],
"shared-networks": [],
"subnet4": [
{
"interface": "enp0s9",
"pools": [
{
"pool": "10.0.0.1-10.0.0.11",
"require-client-classes": [
"super-fun-clients"
]
},
{
"pool": "10.0.0.15-10.0.0.25"
}
],
"reservation-mode": "global",
"subnet": "10.0.0.0/24"
}
],
"valid-lifetime": 4000
}
}
```
am I making a mistake or is it a bug or pool selection is not possible this way?
EDIT: and packets are classified correctly, pkt with mac address "aa:bb:cc:dd:ee:ff" is assigned to `super-fun-clients` class
`DHCP4_CLASS_ASSIGNED [hwtype=1 aa:bb:cc:dd:ee:ff], cid=[no info], tid=0x3eaf28: client packet has been assigned to the following class(es): ALL, super-fun-clients, KNOWN`kea1.7.10https://gitlab.isc.org/isc-projects/kea/-/issues/1311run the LFC process at a less favorite priority2020-07-14T11:08:58ZFrancis Dupontrun the LFC process at a less favorite priorityCall setpriority() system call with for instance 4 (default priority is 0, range is -20 to 19 or 20, lower is better and lower than 0 is privileged).
It is a few lines patch (2 includes, one call and error handling).Call setpriority() system call with for instance 4 (default priority is 0, range is -20 to 19 or 20, lower is better and lower than 0 is privileged).
It is a few lines patch (2 includes, one call and error handling).kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1302large interface id cause error: DHCPSRV_OPEN_SOCKET_FAIL failed to open socke...2020-07-08T09:58:21ZMitsuru Nakakawajilarge interface id cause error: DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: the interface eth0 has no usable IPv4 addresses configured**Describe the bug**
When the interface id is greater than 65535, kea-dhcp4 issue error "DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: the interface eth0 has no usable IPv4 addresses configured" and does not work.
**To Reproduce**
R...**Describe the bug**
When the interface id is greater than 65535, kea-dhcp4 issue error "DHCPSRV_OPEN_SOCKET_FAIL failed to open socket: the interface eth0 has no usable IPv4 addresses configured" and does not work.
**To Reproduce**
Run following shell script test.sh with Dockerfile in root user to reproduce the behavior.
test.sh
```
#!/bin/bash
docker build -t test .
COUNT=65536
I=0
while [ $I -lt $COUNT ]
do
brctl addbr test
if (( $I % 100 == 0 ))
then
ip link
fi
brctl delbr test
let I++
done
docker run --rm test
```
Dockerfile
```
FROM alpine:edge
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories &&\
apk add --update --no-cache mariadb-client kea-dhcp4@testing
RUN mkdir /run/kea
RUN sed -i -e 's/"interfaces":.*/"interfaces": [ "*" ]/g' /etc/kea/kea-dhcp4.conf
RUN sed -i -e 's/"output":.*/"output": "stdout"/g' /etc/kea/kea-dhcp4.conf
CMD [ "kea-dhcp4", "-c", "/etc/kea/kea-dhcp4.conf" ]
```
**Expected behavior**
kea-dhcp4 server starts without error.
**Environment:**
- Kea version: Kea DHCPv4 server version 1.7.8 (development)
- OS: alpine(docker container), CentOS/7 with brclt (docker host)
**Additional Information**
I have found the code that causes this bug.
at https://gitlab.isc.org/isc-projects/kea/-/blob/master/src/lib/dhcp/iface_mgr.h#L212
`uint16_t getIndex() const { return ifindex_; }`
In, ifindex_ is an int type, but the return value is a uint16_t type. When the value of ifindex_ exceeds 65536, the upper bits are cut off and a different value is returned.
On the other hand, in the code of https://gitlab.isc.org/isc-projects/kea/-/blob/master/src/lib/dhcp/iface_mgr_linux.cc#L289, the return value of getIndex() and ifa_index have been compared and failed to find the interface due to a mismatch.kea1.7.10Tomek MrugalskiTomek Mrugalskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1293Test order bug in stats library2020-07-16T13:07:40ZFrancis DupontTest order bug in stats libraryFound on FreeBSD but not related to the system, only to the order unit tests are run:
ObservationTest::setCountLimit unit test is the first unit test of observation_unittest.cc which relies on the default max count so fails if stats man...Found on FreeBSD but not related to the system, only to the order unit tests are run:
ObservationTest::setCountLimit unit test is the first unit test of observation_unittest.cc which relies on the default max count so fails if stats manager unit tests are run before. Two fixes:
- make stats manager to restore defaults for instance using a RAII setter.
- add `Observation::setMaxSampleCountDefault(20);` in the ObservationTest fixture constructor body.
(I used the second with success)kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1285performance drop for mysql backend2020-07-27T18:28:21ZWlodzimierz Wencelperformance drop for mysql backendBetween releases of 1.7.6 and 1.7.7 we observed 30% performance drop from v4 and v6 mysql backend. (and roughly 5% for all others)
I didn't have a time to fully investigate entire 1.7.7 release to catch responsible commits.Between releases of 1.7.6 and 1.7.7 we observed 30% performance drop from v4 and v6 mysql backend. (and roughly 5% for all others)
I didn't have a time to fully investigate entire 1.7.7 release to catch responsible commits.kea1.7.10Wlodzimierz WencelWlodzimierz Wencelhttps://gitlab.isc.org/isc-projects/kea/-/issues/1283Adding a boost::hash specialization for IOAddress2020-07-27T11:21:23ZFrancis DupontAdding a boost::hash specialization for IOAddressWith a boost::hash<IOAddress> we can use hashed index over IOAddresses (hashed indexes are fasters than ordered when existence is the only wanted property, i.e. when the order never matters).
I propose to simply use the toBytes() when b...With a boost::hash<IOAddress> we can use hashed index over IOAddresses (hashed indexes are fasters than ordered when existence is the only wanted property, i.e. when the order never matters).
I propose to simply use the toBytes() when both IPv4 and IPv6 addresses are used and perhaps toUint32() in the rare case the index is only for IPv4 addresses so it is in fact pretty trivial.
https://www.boost.org/doc/libs/1_73_0/doc/html/hash/custom.html for the referencekea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1282too late hook library effective unload2020-06-30T17:28:11ZFrancis Duponttoo late hook library effective unloadThe thread sanitizer shows too late effective unload of the HA hook library.The thread sanitizer shows too late effective unload of the HA hook library.kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1279unload libraries on HooksManager::unloadLibraries2020-06-30T17:27:43ZRazvan Becheriuunload libraries on HooksManager::unloadLibrarieskea1.7.10Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1265changing subnet ordering from insertion order to ascending subnet id order2020-07-29T11:26:34ZFrancis Dupontchanging subnet ordering from insertion order to ascending subnet id orderkea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1264extend the multi-thread safety section in Hook's Developer's Guide2020-06-25T17:06:13ZFrancis Dupontextend the multi-thread safety section in Hook's Developer's GuideThe Hook's Developer's Guide has a short text about multi-thread safety around the multi_threading_compatible C function and the MultiThreadingCriticalSection.
This ticket proposes to extend this by:
- explain the difference between th...The Hook's Developer's Guide has a short text about multi-thread safety around the multi_threading_compatible C function and the MultiThreadingCriticalSection.
This ticket proposes to extend this by:
- explain the difference between the Kea thread safety and the generic thread safety
- explain how to make the hook code Kea thread safe
- insist about the fact that MultiThreadingCriticalSection must **not** be used when can be entered from a packet processing callout point
- give the (short) list of Kea APIs which are generic thread safe
- insist about the fact that by outside this **short** list all Kea APIs are **not** generic thread safe nor in general the C++ programming language
- use the last comment to introduce the fact that hooks are not required to be written in C++kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1248doc/sphinx/Makefile uses GNU make specific features2020-07-28T08:24:05ZFrancis Dupontdoc/sphinx/Makefile uses GNU make specific featuresThere are a few:
```
foo=$(shell xxx)
```
and
```
foo=$(foreach x,y,z)
```There are a few:
```
foo=$(shell xxx)
```
and
```
foo=$(foreach x,y,z)
```kea1.7.10Michal NowikowskiMichal Nowikowskihttps://gitlab.isc.org/isc-projects/kea/-/issues/1247race condition during configuration reading from db and setting to db2020-07-07T10:40:05ZMichal Nowikowskirace condition during configuration reading from db and setting to dbWhen there is a series of *-set commands executed during 1second it may appear that Kea starts reading modifications from the db in the middle of this second. So it will read only part of modifications. In next turn Kea checks timestamp ...When there is a series of *-set commands executed during 1second it may appear that Kea starts reading modifications from the db in the middle of this second. So it will read only part of modifications. In next turn Kea checks timestamp of modifications: ts > last_ts. Unfortunately timestamps have 1s resolution so the other part of changes will not be noticed as they happend in the same last_ts.
This can happen quite frequently when config-fetch-wait-time is set to 1s. In that case Kea checks modifications every second so there is high chance that it will get in the middle of series of modification.
It is exposed by Forge test: tests/dhcpv6/kea_only/config_backend/test_cb_v4_options.py::test_multiple_subnet_optionkea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1223update configure to support cross compiling2020-07-14T11:40:51ZFrancis Dupontupdate configure to support cross compilingThere is one AC_TRY_RUN without an action-if-cross-compiling to update in configure.ac and associated m4 macros.There is one AC_TRY_RUN without an action-if-cross-compiling to update in configure.ac and associated m4 macros.kea1.7.10Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/1221cross compiling Kea for raspbian2020-07-23T20:38:34ZFrancis Dupontcross compiling Kea for raspbiankea1.7.10Francis DupontFrancis Dupont