Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2019-07-01T12:25:53Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/642Update MySQL CB with calls to set, delete and retrieve servers2019-07-01T12:25:53ZMarcin SiodelskiUpdate MySQL CB with calls to set, delete and retrieve serversThe MySQL CB will need to implement new calls to set, delete and retrieve the servers from the `dhcp4_server` and `dhcp6_server` tables. This work depends on #641.The MySQL CB will need to implement new calls to set, delete and retrieve the servers from the `dhcp4_server` and `dhcp6_server` tables. This work depends on #641.Kea1.6-beta2Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/641Extend CB API with CBServer object2019-07-22T10:52:37ZMarcin SiodelskiExtend CB API with CBServer objectIn order to add support to the Configuration Backend to manage servers in the database we need a `CBServer` object to which will represent the server along with its description, id, modification timestamp etc. This issue is about creatin...In order to add support to the Configuration Backend to manage servers in the database we need a `CBServer` object to which will represent the server along with its description, id, modification timestamp etc. This issue is about creating such object and extending the test config backends with the API calls that set, delete, get server tags.Kea1.6-beta2Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/637mysql_cb unit tests fail on Mac OS2019-07-22T10:53:13ZRazvan Becheriumysql_cb unit tests fail on Mac OSsome unit tests fail on Mac OS
[ RUN ] MySqlConfigBackendDHCPv6Test.getAllSubnets6
mysql_cb_dhcp6_unittest.cc:856: Failure
Expected equality of these values:
test_subnets_[i + 1]->toElement()->str()
Which is:
"{ \"i...some unit tests fail on Mac OS
[ RUN ] MySqlConfigBackendDHCPv6Test.getAllSubnets6
mysql_cb_dhcp6_unittest.cc:856: Failure
Expected equality of these values:
test_subnets_[i + 1]->toElement()->str()
Which is:
"{ \"id\": 1024, \"option-data\": [ ], \"pd-pools\": [ { \"delegated-len\": 64, \"option-data\": [ { \"always-send\": true, \"code\": 1254, \"csv-format\": false, \"data\": \"20010DB8000000000000000000000003\", \"name\": \"option-1254\", \"space\": \"dhcp6\" }, { \"always-send\": true, \"code\": 1, \"csv-format\": false, \"data\": \"\", \"name\": \"isc-1\", \"space\": \"isc\" } ],
______________________________________________________________________________________________________________
\"prefix\": \"2001:db8:c::\", \"prefix-len\": 48 }, { \"delegated-len\": 64, \"option-data\": [ ],
______________________________________________________________________________________________________________
\"prefix\": \"2001:db8:d::\", \"prefix-len\": 48 } ], \"pools\": [ { \"option-data\": [ { \"always-send\": true, \"code\": 1254, \"csv-format\": false, \"data\": \"20010DB8000000000000000000000003\", \"name\": \"option-1254\", \"space\": \"dhcp6\" }, { \"always-send\": true, \"code\": 1, \"csv-format\": false, \"data\": \"\", \"name\": \"isc-1\", \"space\": \"isc\" } ], \"pool\": \"2001:db8:1::10-2001:db8:1::20\" }, { \"option-data\": [ ], \"pool\": \"2001:db8:1::50-2001:db8:1::60\" } ], \"preferred-lifetime\": 40, \"rebind-timer\": 30, \"relay\": { \"ip-addresses\": [ ] }, \"renew-timer\": 20, \"subnet\": \"2001:db8:1::/48\", \"valid-lifetime\": 50 }"
subnets[i]->toElement()->str()
Which is:
"{ \"id\": 1024, \"option-data\": [ ], \"pd-pools\": [ { \"delegated-len\": 64, \"option-data\": [ { \"always-send\": true, \"code\": 1254, \"csv-format\": false, \"data\": \"20010DB8000000000000000000000003\", \"name\": \"option-1254\", \"space\": \"dhcp6\" }, { \"always-send\": true, \"code\": 1, \"csv-format\": false, \"data\": \"\", \"name\": \"isc-1\", \"space\": \"isc\" } ],
______________________________________________________________________________________________________________
______________________________________________________________________________________________________________
\"prefix\": \"2001:db8:d::\", \"prefix-len\": 48 } ], \"pools\": [ { \"option-data\": [ { \"always-send\": true, \"code\": 1254, \"csv-format\": false, \"data\": \"20010DB8000000000000000000000003\", \"name\": \"option-1254\", \"space\": \"dhcp6\" }, { \"always-send\": true, \"code\": 1, \"csv-format\": false, \"data\": \"\", \"name\": \"isc-1\", \"space\": \"isc\" } ], \"pool\": \"2001:db8:1::10-2001:db8:1::20\" }, { \"option-data\": [ ], \"pool\": \"2001:db8:1::50-2001:db8:1::60\" } ], \"preferred-lifetime\": 40, \"rebind-timer\": 30, \"relay\": { \"ip-addresses\": [ ] }, \"renew-timer\": 20, \"subnet\": \"2001:db8:1::/48\", \"valid-lifetime\": 50 }"
[ FAILED ] MySqlConfigBackendDHCPv6Test.getAllSubnets6 (113 ms)
[ RUN ] MySqlConfigBackendDHCPv6Test.getSharedNetworkSubnets6
mysql_cb_dhcp6_unittest.cc:984: Failure
Value of: isEquivalent(test_subnets_[1]->toElement(), subnets[0]->toElement())
Actual: false
Expected: true
mysql_cb_dhcp6_unittest.cc:992: Failure
Value of: isEquivalent(test_subnets_[1]->toElement(), subnets[0]->toElement())
Actual: false
Expected: true
[ FAILED ] MySqlConfigBackendDHCPv6Test.getSharedNetworkSubnets6 (113 ms)
I have made an initial investigation. The data in the database is similar for Linux and Mac OS, but it seems that the same query returns the data in a different order. I am not sure how is this actually impacting the actual serialization of the subnet form the databaseKea1.6-beta2Razvan BecheriuRazvan Becheriuhttps://gitlab.isc.org/isc-projects/kea/-/issues/632Pools are not properly updated by MySQL CB when subnet id is modified2019-08-01T16:14:41ZMarcin SiodelskiPools are not properly updated by MySQL CB when subnet id is modifiedMySQL CB allows for modifying subnet id with `remote-subnet4-set` and `remote-subnet6-set`. However, there is a bug in MySQL logic, which causes duplication of the pool during such update. Prior to updating the subnet information, the ba...MySQL CB allows for modifying subnet id with `remote-subnet4-set` and `remote-subnet6-set`. However, there is a bug in MySQL logic, which causes duplication of the pool during such update. Prior to updating the subnet information, the backend deletes existing pools. Then it recreates them after the subnet is updated. The backend mistakenly uses new subnet id for deleting the pools. As a result the pools remain in the database. Recreating the pools causes duplication of the pool entry and failure to merge the configuration into the server's configuration.Kea1.6-finalMarcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/603mysql_cb fails to register DHCPv6 configuration backend for MySQL2019-05-15T11:24:34ZMarcin Siodelskimysql_cb fails to register DHCPv6 configuration backend for MySQLThis is an omission from the previous ticket which implemented MySQL v6 CB. We forgot to call the function to register v6 configuration backend in the `load()` function.
I am adding this to 1.6.0 as this is no brainer that it must be done.This is an omission from the previous ticket which implemented MySQL v6 CB. We forgot to call the function to register v6 configuration backend in the `load()` function.
I am adding this to 1.6.0 as this is no brainer that it must be done.Kea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/580Add support for associating a subnet with shared network via remote-subnet4-set2019-06-13T07:35:07ZMarcin SiodelskiAdd support for associating a subnet with shared network via remote-subnet4-setThe cb_cmds hooks library supports remote-subnet4-set command which can be used to add or update a subnet in the config backend. There is currently no way to add a subnet to an existing shared network, nor update the subnet being in a sh...The cb_cmds hooks library supports remote-subnet4-set command which can be used to add or update a subnet in the config backend. There is currently no way to add a subnet to an existing shared network, nor update the subnet being in a shared network. The only way to add a subnet within a shared network is by issuing remote-network4-set, but that's an overkill if the shared network contains many subnets.
The following is the relevant part of the design: https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#remote-subnet4-set
It proposes an optional parameter `shared-network-name` within a subnet definition which would specify that the added/updated subnet should be placed within a shared network having a given name. This issue is about implementing this functionality.Kea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/579cb-cmds: inconsistency in function arguments structure2019-04-26T14:21:56ZMichal Nowikowskicb-cmds: inconsistency in function arguments structureIn case of remote-global-parameter4-set, parameters are passed as list of dicts with `name` and `values` fields:
```
'parameters': [{'name': 'match-client-id', 'value': False}],
```
In case of remote-subnet4-set, parameters are pas...In case of remote-global-parameter4-set, parameters are passed as list of dicts with `name` and `values` fields:
```
'parameters': [{'name': 'match-client-id', 'value': False}],
```
In case of remote-subnet4-set, parameters are passed as dictionary `name` -> `value`:
```
{'match-client-id': true}
```Kea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/566DHCPv6 server to delete elements of the local configuration that were deleted...2019-04-18T16:35:39ZMarcin SiodelskiDHCPv6 server to delete elements of the local configuration that were deleted from the CBThe DHCPv6 server is able to periodically fetch new configuration elements and updated configuration elements from the configuration backend. However, it currently doesn't delete those elements of the local configuration that have been d...The DHCPv6 server is able to periodically fetch new configuration elements and updated configuration elements from the configuration backend. However, it currently doesn't delete those elements of the local configuration that have been deleted from the database. The DHCPv4 server is already doing it so it is a matter of mostly copying the logic from the v4 server.
We also have to make sure that the MySQL v6 configuration backend sets the ids of deleted elements for option definitions, options, networks and subnets.Kea1.6Thomas MarkwalderThomas Markwalderhttps://gitlab.isc.org/isc-projects/kea/-/issues/552cb: created empty subnet contains unset values2019-04-04T19:49:27ZMichal Nowikowskicb: created empty subnet contains unset values1. creating empty subnet:
```
{'arguments': {'remote': {'type': 'mysql'},
'server-tags': ['abc'],
'subnets': [{'interface': '$(SERVER_IFACE)',
'pools': [{'pool': '192.168.50.1-192...1. creating empty subnet:
```
{'arguments': {'remote': {'type': 'mysql'},
'server-tags': ['abc'],
'subnets': [{'interface': '$(SERVER_IFACE)',
'pools': [{'pool': '192.168.50.1-192.168.50.100'}],
'subnet': '192.168.50.0/24'}]},
'command': 'remote-subnet4-set',
'service': ['dhcp4']}
[
{
"arguments": {
"subnets": [
{
"id": 1,
"subnet": "192.168.50.0/24"
}
]
},
"result": 0,
"text": "IPv4 subnet successfully set."
}
]
```
2. config reload
3. config get:
```
...
"subnet4": [
{
"4o6-interface": "",
"4o6-interface-id": "",
"4o6-subnet": "",
"authoritative": false,
"boot-file-name": "",
"calculate-tee-times": false,
"id": 1,
"interface": "enp0s10",
"match-client-id": true,
"next-server": "0.0.0.0",
"option-data": [],
"pools": [
{
"option-data": [],
"pool": "192.168.50.1-192.168.50.100"
}
],
"rebind-timer": 2000,
"relay": {
"ip-addresses": []
},
"renew-timer": 1000,
"reservation-mode": "all",
"reservations": [],
"server-hostname": "",
"subnet": "192.168.50.0/24",
"t1-percent": 0.5,
"t2-percent": 0.875,
"valid-lifetime": 4000
}
],
"t1-percent": 0.5,
"t2-percent": 0.875,
"valid-lifetime": 4000
...
```
As it can be seen probably default values are return.
It also is visible that some global params have default values while they were NOT set as well.Kea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/521MySQL Config Backend must not validate formatted options fetched from the DB2019-03-14T09:37:38ZMarcin SiodelskiMySQL Config Backend must not validate formatted options fetched from the DBThere is a dependency between DHCP options and the option definitions. Some options can be parsed without option definitions, but only if the option data is specified in the hex/string format. Many times, administrators specify options w...There is a dependency between DHCP options and the option definitions. Some options can be parsed without option definitions, but only if the option data is specified in the hex/string format. Many times, administrators specify options with the `csv-format` parameter set to `true`. Such options require option definitions to be interpreted. There are three places where such interpretation is required. One, when the option is added to the database via cb_cmds hooks library. Second, when the option is fetched from the database and must be used by the DHCP server. Third, when the option is returned via the control channel as a result of the `remote-option4-global-get`. However, the option definitions may not be available at the time when options are stored or fetched from the config database.
This ticket is going to address the second case and will remove the dependency of fetched options from the option definitions stored in `LibDHCP`. For each option that contains a formatted_value the mysql_cb will return generic `option_` member that holds a pointer to an empty option (`OptionPtr`) having appropriate option code. The formatted option data will be carried in the `OptionDescriptor` object. The returned data won't be validated against definitions in the mysql_cb. We will have another utility function (part of `CfgOption`?) that will go over options and validate them against appropriate option definitions. The server will invoke this function upon the config merge.
The other two cases (validating of options in the cb_cmds) are out of scope in this issue. We're going to continue using LibDHCP runtime option definitions to validate the options within cb_cmds. It will be addressed in another ticket(s), likely after 1.6.0.Kea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/501remote-option4-global-set accepts option with empty data2022-10-24T08:02:55ZWlodzimierz Wencelremote-option4-global-set accepts option with empty data```
{
"arguments": {
"options": [
{
"code": 6
}
],
"remote": {
"type": "mysql"
},
"server-tags": [
"abc"
]
},
"command": "remote-option4-global-set"
}
```
Response:
```
{
"a...```
{
"arguments": {
"options": [
{
"code": 6
}
],
"remote": {
"type": "mysql"
},
"server-tags": [
"abc"
]
},
"command": "remote-option4-global-set"
}
```
Response:
```
{
"arguments": {
"options": [
{
"code": 6,
"space": "dhcp4"
}
]
},
"result": 0,
"text": "DHCPv4 option successfully set."
}
```
Kea should not be configured with empty option. Possible that it's not yet implemented.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/496Correct manual section: "relayed traffic in shared networks"2019-08-15T19:24:22ZMarcin SiodelskiCorrect manual section: "relayed traffic in shared networks"The "Local and relayed traffic in shared networks" implies that using different "relay" values for different subnets within a shared network will cause the server to prefer the subnets with matching selector. In fact, the relay case is n...The "Local and relayed traffic in shared networks" implies that using different "relay" values for different subnets within a shared network will cause the server to prefer the subnets with matching selector. In fact, the relay case is no different than selection via interface name (direct traffic). The server will initially select the subnet indicated by the relay, but will later change it to a subnet that was most recently used. The documentation must be corrected in that regard.Kea1.6-finalhttps://gitlab.isc.org/isc-projects/kea/-/issues/490DHCPv4 server must interpret unspecified subnet and shared network parameters...2019-03-29T15:07:32ZMarcin SiodelskiDHCPv4 server must interpret unspecified subnet and shared network parameters fetched from the DBThe DHCPv4 server fetches the subnets and shared networks from the database and merges them into the current configuration. For all subnet and network specific values that are marked "unspecified" it must use the higher level values, e.g...The DHCPv4 server fetches the subnets and shared networks from the database and merges them into the current configuration. For all subnet and network specific values that are marked "unspecified" it must use the higher level values, e.g. globals. This work depends on #487. For details see: https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#encoding-other-unspecified-parametersKea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/489The MySQL Config Backend must store unspecified subnet and network parameters...2019-03-04T15:13:59ZMarcin SiodelskiThe MySQL Config Backend must store unspecified subnet and network parameters as nullThe subnet and shared network specific values that are not specified in the respective SET commands should be stored as null in the database. This work depends on #487. For more details consult: https://gitlab.isc.org/isc-projects/kea/wi...The subnet and shared network specific values that are not specified in the respective SET commands should be stored as null in the database. This work depends on #487. For more details consult: https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#encoding-other-unspecified-parametersKea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/488Remove setting default values for the subnet and shared network in the cb_cmds2019-03-07T13:51:58ZMarcin SiodelskiRemove setting default values for the subnet and shared network in the cb_cmdsAs described in the config backend design: https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#encoding-other-unspecified-parameters, the cb_cmds hooks library must not set default values for a subnet and sha...As described in the config backend design: https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#encoding-other-unspecified-parameters, the cb_cmds hooks library must not set default values for a subnet and shared network and mark the missing values as "unspecified".Kea1.6Thomas MarkwalderThomas Markwalderhttps://gitlab.isc.org/isc-projects/kea/-/issues/487Modify subnet and shared network objects to hold information about unspecifie...2019-02-28T14:09:40ZMarcin SiodelskiModify subnet and shared network objects to hold information about unspecified valuesThe values of the Subnet and Network objects should be encapsulated in the `OptionalValue` template to be able to mark some of the parameters as unspecified if they are not set in the CB commands that set new subnet and shared network. S...The values of the Subnet and Network objects should be encapsulated in the `OptionalValue` template to be able to mark some of the parameters as unspecified if they are not set in the CB commands that set new subnet and shared network. See https://gitlab.isc.org/isc-projects/kea/wikis/designs/configuration-in-db-design#encoding-other-unspecified-parameters for the details.
Such change also requires that the subnet and shared network parsers are modified to mark values as unspecified if they are not explicitly set in the command.Kea1.6Marcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/479HA peer should drop leases not present on the partner during sync2022-11-02T15:10:19ZMarcin SiodelskiHA peer should drop leases not present on the partner during syncLet's suppose there are two HA peers A and B. The peer B dies. While the peer B is offline, the admin sends `lease4-del` command to the A. The peer B starts up and synchronizes its lease database with A. It correctly adds new leases and ...Let's suppose there are two HA peers A and B. The peer B dies. While the peer B is offline, the admin sends `lease4-del` command to the A. The peer B starts up and synchronizes its lease database with A. It correctly adds new leases and updates existing leases based on the list received from A. However, it doesn't remove the lease deleted on A while it was offline. The server admin would need to send `lease4-del` command to B to remove the lease.
In order to address this problem we have to fetch all leases from the B's backend and iterate over them to see if they are also present on A. In order to do so, we will have to keep the local copy of leases received from A. For Memfile, MySQL and Postgres we could do it more efficiently by comparing ranges of leases as they are ordered by IP addresses. After comparing a range of leases we could simply drop the local copy of the lease ranges. However, this won't work for Cassandra which returns leases out of order. In the Cassandra case we will have to collect all leases returned by the peer.backlogMarcin SiodelskiMarcin Siodelskihttps://gitlab.isc.org/isc-projects/kea/-/issues/464Kea DHCPv4 not able to send vendor options if client doesn't send vivso2019-02-19T12:04:48ZTomek MrugalskiKea DHCPv4 not able to send vendor options if client doesn't send vivsoA customer reported a problem that Kea is unable to send back vivso sub-options. Kea sends only the top-level vivso option with correct vendor-id, but is not able to send back any sub-options.
The problem has been investigated and this ...A customer reported a problem that Kea is unable to send back vivso sub-options. Kea sends only the top-level vivso option with correct vendor-id, but is not able to send back any sub-options.
The problem has been investigated and this is caused by the Genexis clients that do not send vivso option itself. That way, the server is not able to figure out what vendor-id to use.
In ideal world, Genexis client would send vivso with enterprise value set to 25167. But they don't and we need to tweak Kea to be able to work around that.Kea1.6Tomek MrugalskiTomek Mrugalskihttps://gitlab.isc.org/isc-projects/kea/-/issues/462DHCPv6 support for cb_cmds hook2019-02-08T14:57:56ZFrancis DupontDHCPv6 support for cb_cmds hookKea1.6Francis DupontFrancis Duponthttps://gitlab.isc.org/isc-projects/kea/-/issues/461DHCPv6 support in MySQL config backend hook.2019-02-08T14:50:18ZFrancis DupontDHCPv6 support in MySQL config backend hook.DHCPv6 support in/for src/hooks/dhcp/mysql_cbDHCPv6 support in/for src/hooks/dhcp/mysql_cbKea1.6Francis DupontFrancis Dupont