Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2023-11-18T09:34:42Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/1027Database reconnect settings ignored during startup2023-11-18T09:34:42ZChrisDatabase reconnect settings ignored during startup**Describe the bug**
During startup if the database is unreachable (which is easily possible during boot since there is, understandably, no dependency/ordering on sql servers in the default systemd unit) kea-server will immediately shut...**Describe the bug**
During startup if the database is unreachable (which is easily possible during boot since there is, understandably, no dependency/ordering on sql servers in the default systemd unit) kea-server will immediately shut down despite reconnect settings.
Since there is a chance for the SQL database to be available after kea is being started this can lead to kea not running after boot despite being expected to.
**To Reproduce**
Steps to reproduce the behavior:
1. Configure Kea with mysql leases/reservations including reconnect options ("max-reconnect-tries": 10,"reconnect-wait-time": 1000)
2. Stop and start kea + mysql, kea before mysql
```
service isc-kea-dhcp4-server stop; service mysql stop; service isc-kea-dhcp4-server start; service mysql start; sleep 1; service isc-kea-dhcp4-server status;
```
3. See that no reconnect attempts were made
**Expected behavior**
Kea to use the reconnect options during startup
**Environment:**
- Kea version: 1.6.0
- OS: Ubuntu 18.04 x64
- From ISC Kea repository
- If/which hooks where loaded in: lease-commands, haoutstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/1018statistic-remove-all removes also total-addresses and similar statistics2022-11-02T15:10:19ZFrancis Dupontstatistic-remove-all removes also total-addresses and similar statisticsNot very consistent but not critical too. Just should be addressed before using stats contexts.Not very consistent but not critical too. Just should be addressed before using stats contexts.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/1012Add a require at least version in config syntax2019-12-12T16:59:48ZFrancis DupontAdd a require at least version in config syntaxThis feature will provide a way to say the configuration file requires at least a specified Kea version. Useful for Keama and Stork, or in general for any tool which builds configuration files.This feature will provide a way to say the configuration file requires at least a specified Kea version. Useful for Keama and Stork, or in general for any tool which builds configuration files.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/1009Provide a standard queue choice for packet queue2019-12-12T16:57:24ZFrancis DupontProvide a standard queue choice for packet queueToday we have only the ring but even with an infinite (0) capacity it is not the same than a queue.
Whether this should stay internal to the dhcp library or available to DHCP server syntaxes is still a subject for discussion.Today we have only the ring but even with an infinite (0) capacity it is not the same than a queue.
Whether this should stay internal to the dhcp library or available to DHCP server syntaxes is still a subject for discussion.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/1001configure tweaks2022-02-21T16:09:52ZTomek Mrugalskiconfigure tweaksThere are several things we could tweak in the configure script:
- several help instances show defaults in double brackets `[[default=no]]`, but others show in single brackets `[default=no]` and others as `(default=no)` , e.g. --with-we...There are several things we could tweak in the configure script:
- several help instances show defaults in double brackets `[[default=no]]`, but others show in single brackets `[default=no]` and others as `(default=no)` , e.g. --with-werror.
- unknown (e.g. misspelled) parameters are ignored (e.g. `--with-gtest-sources=..`). There's a warning at the top, but it should either be error or at least made more prominent.
- sphinx-build is being printed twice
- the expression "building docs in PDF" is awkward, should be "building PDF docs"
- there are old checks for __SUNPRO_CC - we don't and won't support Solaris
- with-aix-soname - why do we have option like this?
- the options are split into "optional features" and "optional packages" in seemingly random fashion (perfdhcp, static link and disable-rpath are in packages section, mysql, werror checking and some weird AIX options in "packages")outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/997Remove commit and rollback methods from lease and host manager APIs.2022-11-02T15:10:18ZFrancis DupontRemove commit and rollback methods from lease and host manager APIs.They are unused so useless. Note they make sense only with transactions which span over more than one service method and such transactions (nor a way to manage them) do not exist.They are unused so useless. Note they make sense only with transactions which span over more than one service method and such transactions (nor a way to manage them) do not exist.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/995500 IPv4 address limit2022-11-02T15:10:17ZGhost User500 IPv4 address limit**Describe the bug**
When more than 500 IPv4 addresses are configured on NICs that KEA uses, no configuration changes can be made using hooks. kea-dhcp4 goes to 100% CPU load.
**To Reproduce**
Steps to reproduce the behavior:
1. Run Kea...**Describe the bug**
When more than 500 IPv4 addresses are configured on NICs that KEA uses, no configuration changes can be made using hooks. kea-dhcp4 goes to 100% CPU load.
**To Reproduce**
Steps to reproduce the behavior:
1. Run Kea (dhcpv4) with MySQL backend for CB, leases and hosts and configured to use a NIC with 500+ IPv4 addresses on it
2. Try to change configuration for example like:
curl -X POST -H "Content-Type: application/json" -d '{ "command": "remote-network4-set", "service": [ "dhcp4" ], "arguments": { "shared-networks": [ { "name": "test-1", "interface": "ens37", "valid-lifetime": 60 } ], "remote": { "type": "mysql" }, "server-tags": [ "all" ] } }' http://localhost:8080/
or
curl -X POST -H "Content-Type: application/json" -d '{ "command": "reservation-add", "service": [ "dhcp4" ], "arguments": { "reservation": { "subnet-id": 20001, "hw-address": "1a:2b:3c:4d:5e:6f", "ip-address": "10.0.1.2" } } }' http://localhost:8080/
3. The server then goes to 100% CPU load and does not change the configuration as requested.
4. Response: [ { "result": 1, "text": "unable to forward command to the dhcp4 service: Operation canceled. The server is likely to be offline" } ]
**Expected behavior**
A clear and concise description of what you expected to happen:
The server should change the configuration as requested and not keep using 100% CPU.
**Environment:**
- Kea version: 1.6.0
- OS: Debian 10.1 x64
- MySQL backend 8.2, library 10.3.17, Memfile backend 2.1
- libdhcp_mysql_cb.so, libdhcp_cb_cmds.so, libdhcp_host_cmds.so are loaded
**Additional Information**
Everything works as expected with up to 499 IPv4 addresses on the NIC used by KEA. We did not test IPv6. We also did not test if the server is still able to answer to DHCP requests in the failed state.
**Contacting you**
You can send me an e-mail to stephan@bahr-it.combackloghttps://gitlab.isc.org/isc-projects/kea/-/issues/993Remove bad use of NULL or nullptr from Kea C++ code.2019-12-05T16:52:19ZFrancis DupontRemove bad use of NULL or nullptr from Kea C++ code.For the second we decided a long time ago to not use it. For the first it is far simpler: NULL simply does not exist in C++ (and BTW some systems do not define it for C++ which is with type problems from the cast another source of errors...For the second we decided a long time ago to not use it. For the first it is far simpler: NULL simply does not exist in C++ (and BTW some systems do not define it for C++ which is with type problems from the cast another source of errors with NULL).outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/990Better support for recent Botan (configure, warnings)2022-11-02T15:10:18ZFrancis DupontBetter support for recent Botan (configure, warnings)Recent versions of Botan display some warnings:
```
In file included from botan_hash.cc:14:
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/lookup.h:35:1: warning: this header is deprecated [-W#pragma-messages]
BOTAN_DEPRECATED_HEAD...Recent versions of Botan display some warnings:
```
In file included from botan_hash.cc:14:
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/lookup.h:35:1: warning: this header is deprecated [-W#pragma-messages]
BOTAN_DEPRECATED_HEADER(lookup.h)
^
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/compiler.h:104:42: note: expanded from macro 'BOTAN_DEPRECATED_HEADER'
#define BOTAN_DEPRECATED_HEADER(hdr) _Pragma("message \"this header is deprecated\"")
^
<scratch space>:214:2: note: expanded from here
message "this header is deprecated"
^
1 warning generated.
In file included from botan_hmac.cc:14:
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/hmac.h:14:1: warning: this header will be made internal in the future [-W#pragma-messages]
BOTAN_FUTURE_INTERNAL_HEADER(hmac.h)
^
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/compiler.h:107:49: note: expanded from macro 'BOTAN_FUTURE_INTERNAL_HEADER'
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr) _Pragma("message \"this header will be made internal in the future\"")
^
<scratch space>:214:2: note: expanded from here
message "this header will be made internal in the future"
^
In file included from botan_hmac.cc:15:
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/lookup.h:35:1: warning: this header is deprecated [-W#pragma-messages]
BOTAN_DEPRECATED_HEADER(lookup.h)
^
/usr/local/Cellar/botan/2.12.1/include/botan-2/botan/compiler.h:104:42: note: expanded from macro 'BOTAN_DEPRECATED_HEADER'
#define BOTAN_DEPRECATED_HEADER(hdr) _Pragma("message \"this header is deprecated\"")
^
<scratch space>:216:2: note: expanded from here
message "this header is deprecated"
^
2 warnings generated.
```
BTW these warnings are only displayed: the quote is from a --with-werror build.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/980MySQL Group Replication doesn't support foreign key cascade2021-04-06T09:26:00ZGhost UserMySQL Group Replication doesn't support foreign key cascade**COMPLETELY UPDATED**
I'm using Kea 1.7.0 (installed via the cloudsmith.io yum repo) on CentOS 7.7.1908 with all updates installed. I'm using MySQL 8.0.18 installed from MySQL's yum repo for the backend. MySQL is configured with Group ...**COMPLETELY UPDATED**
I'm using Kea 1.7.0 (installed via the cloudsmith.io yum repo) on CentOS 7.7.1908 with all updates installed. I'm using MySQL 8.0.18 installed from MySQL's yum repo for the backend. MySQL is configured with Group Replication.
I ran into this issue trying to insert into dhcp4_options while doing a host reservation.
After digging into MySQL logs I found these errors:
[ERROR] [MY-011543] [Repl] Plugin group_replication reported: 'Table dhcp4_audit has a foreign key with 'CASCADE' clause. This is not compatible with Group Replication.'
[ERROR] [MY-011543] [Repl] Plugin group_replication reported: 'Table dhcp6_audit has a foreign key with 'CASCADE' clause. This is not compatible with Group Replication.'
I set the following foreign keys to no action:
* fk_dhcp4_audit_revision on update
* fk_dhcp6_audit_revision on update
* fk_dhcp4_subnet_shared_network on delete
* fk_dhcp6_subnet_shared_network on delete
* fk_dhcp4_pool_subnet_id on update
* fk_dhcp6_pool_subnet_id on update
* fk_dhcp6_pd_pool_subnet_id on update
Making these changes appears to work. I can insert and delete reservations and reservation specific options and Kea uses the reservations to respond to requests. However, I'm assuming these constraints are in there for a reason so what have I broken by doing this?outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/972Pool level DHCP options are ignored while returning ACK to client's INFORM2021-10-20T10:30:59ZGhost UserPool level DHCP options are ignored while returning ACK to client's INFORM**Bug Description**
For a client's DHCPINFORM message that requests (option 55) for a set of DHCP options, Kea ignores DHCP options in the pool configuration and only returns options specified in the subnet configuration while returning...**Bug Description**
For a client's DHCPINFORM message that requests (option 55) for a set of DHCP options, Kea ignores DHCP options in the pool configuration and only returns options specified in the subnet configuration while returning the DHCPACK
**To Reproduce**
For the example below, randomly selected option 67 (bootfile name) to test
1. Run Kea dhcpv4 with the following subnet config
```
"subnet4": [
{
"subnet": "192.168.5.0/24",
"pools": [
{
"pool": "192.168.5.111 - 192.168.5.222",
"option-data": [
{
"name": "boot-file-name",
"data": "poolLevel"
}]
}],
"option-data": [
{
"name": "boot-file-name",
"data": "subnetLevel"
}]
}
]
```
2. Client sends DHCPDISCOVER wherein client requests for Bootfile name (option 67) in the Parameter Request List (option 55)
3. Kea responds with DHCPOFFER that includes Bootfile name (option 67) with value `poolLevel` from pool configuration
4. Client follows up with DHCPREQUEST with the same list of options and Kea returns DHCPACK with the OFFER'd values.
5. Client sends DHCPINFORM requesting for Bootfile name (option 67) in the Parameter Request List (option 55)
6. Kea returns DHCPACK including Bootfile name (option 67) with unexpected value `subnetLevel`
**Expected behavior**
Server must respond to DHCPINFORM with values from the client's matching pool configuration in the DHCPACK, unless no such option is defined in the pool configuration.
In context of the example above, at step 6, server must return DHCPACK with value of Bootfile name (option 67) as `poolLevel`
**Environment:**
- Kea version: 1.7.1-git
git cf6a766d28c565bd4a0abe8631422dd9fdeb27ce
- OS: Ubuntu 18.04.2outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/968Implement the hash allocator2023-07-05T10:42:16ZFrancis DupontImplement the hash allocatorReference #895, requires #966Reference #895, requires #966next-stable-3.0https://gitlab.isc.org/isc-projects/kea/-/issues/953Provide capability to specify lease lifetimes at Pool and possibly Reservatio...2022-11-02T15:10:20ZGhost UserProvide capability to specify lease lifetimes at Pool and possibly Reservation level---
name: Feature request - Support `valid-lifetime` for pools
about: Management of lease lifetimes in IPv4 and IPv6 pools
---
(Apologies if I have filled the form in incorrectly. I wasn't sure which fields you wanted updated or replac...---
name: Feature request - Support `valid-lifetime` for pools
about: Management of lease lifetimes in IPv4 and IPv6 pools
---
(Apologies if I have filled the form in incorrectly. I wasn't sure which fields you wanted updated or replaced.)
**Some initial questions**
- Are you sure your feature is not already implemented in the latest Kea version?
- I have confirmed it is not implemented in 1.5 and can see no indication in documentation that anything has changed in 1.7.
- Are you sure what you would like to do is not possible using some other mechanisms?
- I do not believe it is possible.
- Have you discussed your idea on kea-users or kea-dev mailing lists?
- I have raised it on kea-users and a similar issue was previously raised in 2017 (https://lists.isc.org/mailman/htdig/kea-users/2017-March/000898.html)
**Is your feature request related to a problem? Please describe.**
- In our environment we mostly use reservations with long leases so that network problems do not cause a loss of address, but cannot do this with addresses from pools otherwise we would run out of pool addresses. We have pools and reservations in non-overlapping sections of the same subnets, so specifying the lease lifetime on the subnet is not an option. The ability to specify lease lifetimes on individual hosts would also be useful but far less important than being able to have different values for pools versus the rest of the subnet.
**Describe the solution you'd like**
I would like to see the `valid-lifetime` attribute supported for pools and possibly reservations. Given the addition of `max-lease-time` and `min-lease-time` in 1.6, it would make sense to provide these as well for consistency although we are unlikely to use them.
**Describe alternatives you've considered**
- Separating pools from reservations using different subnets is not practical as it would require rearchitecting our network which has over 1,000 subnets.
- Having the same lease time for reservations and pools would reduce the reliability/functionality of our network in some areas.
**Additional context**
- We are currently using this capability with the old ISC dhcpd server.
- Our IPv6 configuration mirrors our IPv4 configuration so we would like the capabilities to be equivalent (where this makes sense) in both.
**Funding its development**
Kea is run by ISC, which is a small non-profit organization without any government funding or any permanent sponsorship organizations. Are you able and willing to participate financially in the development costs?
- Unfortunately no. :-(
**Participating in development**
Are you willing to participate in the feature development? ISC team always tries to make a feature as generic as possible, so it can be used in wide variety of situations. That means the proposed solution may be a bit different that you initially thought. Are you willing to take part in the design discussions? Are you willing to test an unreleased engineering code?
- I would be interested in participating, but doubt I would have time to get up to speed on how the software currently works in order to develop any code.
- Do you have any pointers to documentation on the structure of the code so I can start to try to understand it even if I can't produce useful code?
- I am definitely willing to be involved in design discussions, test out engineering code and provide feedback on potential solutions or implementations.
**Contacting you**
How can ISC reach you to discuss this matter further? If you do not specify any means such as e-mail, jabber id or a telephone, we may send you a message on github with questions when we have them.
- I can be contacted at John.Gibbins@csiro.au or +61 2 6124 1419.
- Telephone may be problematic due the time difference with Australia (AEDT = GMT+11).backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/951Move Changelog to markdown2019-11-28T16:44:25ZTomek MrugalskiMove Changelog to markdownWe have issue numbers, MR links and commit-ids in the changelog. If we rename the file to ChangeLog.md, gitlab will turn them into clickable links.We have issue numbers, MR links and commit-ids in the changelog. If we rename the file to ChangeLog.md, gitlab will turn them into clickable links.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/948hooks providing commands should check for control channel2019-11-28T16:39:45ZFrancis Duponthooks providing commands should check for control channelAs mentioned in #794 cb_cmds and in general any hooks mostly providing commands should check a control channel is configured as obviously they are useless without one... #794 recommends to refuse to load.As mentioned in #794 cb_cmds and in general any hooks mostly providing commands should check a control channel is configured as obviously they are useless without one... #794 recommends to refuse to load.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/942Feature: Client-Class option to always be required when "only-if-required" is...2022-11-02T15:10:19ZChrisFeature: Client-Class option to always be required when "only-if-required" is trueExplicitly requiring the classes in every subnet is currently the only way to achieve this.
**Participating in development**
Are you willing to participate in the feature development? ISC team always tries to make a feature as generic a...Explicitly requiring the classes in every subnet is currently the only way to achieve this.
**Participating in development**
Are you willing to participate in the feature development? ISC team always tries to make a feature as generic as possible, so it can be used in wide variety of situations. That means the proposed solution may be a bit different that you initially thought. Are you willing to take part in the design discussions? Are you willing to test an unreleased engineering code?
I am able and willing to help as much as I can/am of use. This includes testing of experimental code.
**Contacting you**
Gitlab/hubbackloghttps://gitlab.isc.org/isc-projects/kea/-/issues/938Implement RFC8539 (new softwire options)2019-10-24T15:54:34ZTomek MrugalskiImplement RFC8539 (new softwire options)There's a new [RFC 8539](https://tools.ietf.org/html/rfc8539) published. We should support it one day.
As there are currently no known customers or users and the complexity of its implementation is non-trivial, this is not a high priority.There's a new [RFC 8539](https://tools.ietf.org/html/rfc8539) published. We should support it one day.
As there are currently no known customers or users and the complexity of its implementation is non-trivial, this is not a high priority.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/929replace boost::shared_ptr/weak_ptr and similar components with std::shared_pt...2019-10-17T15:53:34ZRazvan Becheriureplace boost::shared_ptr/weak_ptr and similar components with std::shared_ptr/std::weak_ptr and respective std componentsAs the code uses std::shared_ptr and boost_shared_ptr, the code should use only c++11 stl (std) components (if provided).
From what I know, only multi index container is not implemented in stl. Everything else should be stl.As the code uses std::shared_ptr and boost_shared_ptr, the code should use only c++11 stl (std) components (if provided).
From what I know, only multi index container is not implemented in stl. Everything else should be stl.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/927Improve parsing of commas within text strings2019-10-17T15:43:43ZMichael McNallyImprove parsing of commas within text stringsOur friend Shawn, on support ticket [#15079](https://support.isc.org/Ticket/Display.html?id=15079) was having a bit of awkwardness trying to define some string-valued options in which the strings contained commas.
He wrote:
>>>
We have ...Our friend Shawn, on support ticket [#15079](https://support.isc.org/Ticket/Display.html?id=15079) was having a bit of awkwardness trying to define some string-valued options in which the strings contained commas.
He wrote:
>>>
We have a customer attempting to put a comma separated string into an option defined as text in Kea. Kea appears to be treating the comma as a delimiter for arrays and discarding the comma and the text after the comma. It appears that you may have addressed this issue somewhat in 1.6.0 but I wanted to check if there is any way to escape or otherwise allow for commas in text strings in 1.5.0.
For example given this option definition
```
{
"space": "dhcp4",
"code": 176,
"type": "string",
"name": "test"
}
```
And this specification for the option value
```
{
"name": "test",
"code": 177,
"data": "foo,bar"
}
```
We are only seeing "foo" put into the packet sent to the client. I have tried single quoting the text
"'foo,bar'" and escaping the comma "foo\,bar" and neither seem to work.
>>>
In a subsequent response on the same ticket he mentions that he has found a way to successfully escape the commas using multiple backslashes but this is likely to be a situation encountered by other operators who may find it similarly confusing, therefore we should consider (ideally) improving the parsing of commas that are within string literals OR (if not) at least better documenting how to use them.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/926configure failed since cannot find stdlib.h on Yocto Poky Linux2022-06-23T08:57:27ZGhost Userconfigure failed since cannot find stdlib.h on Yocto Poky Linuxcongfigure kea with --boost_include_path may cause stdlib.h cannot be found
it is caused by below commit:
https://github.com/isc-projects/kea/commit/98e64a69d5271db2a6f4944b7c377ee6488a1a42
Change of ax_boost_for_kea.m4:
- BOOST_INCL...congfigure kea with --boost_include_path may cause stdlib.h cannot be found
it is caused by below commit:
https://github.com/isc-projects/kea/commit/98e64a69d5271db2a6f4944b7c377ee6488a1a42
Change of ax_boost_for_kea.m4:
- BOOST_INCLUDES="-I${boost_include_path}"
+ BOOST_INCLUDES="-isystem ${boost_include_path}"
and -isystem could cause this problem, refer: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129
and https://stackoverflow.com/questions/37218953/isystem-on-a-system-include-directory-causes-errorsoutstanding