Kea issueshttps://gitlab.isc.org/isc-projects/kea/-/issues2024-03-21T16:21:16Zhttps://gitlab.isc.org/isc-projects/kea/-/issues/414Use new lease user contexts in RADIUS accounting2024-03-21T16:21:16ZFrancis DupontUse new lease user contexts in RADIUS accountingMigrated from https://oldkea.isc.org/ticket/5658
Current code has many potential problems and was scheduled to use use contexts from the beginning but it was postponed because user contexts in leases were implemented later:
- save/load...Migrated from https://oldkea.isc.org/ticket/5658
Current code has many potential problems and was scheduled to use use contexts from the beginning but it was postponed because user contexts in leases were implemented later:
- save/load to a CSV file is implemented but never tested.
- eraseCreateTimestamp() is called only when a STOP event is sent so the timestamp stays in memory without more control
+ obviously using an user-context is the right way: extent following the lease one, save in stable storage, etc.
If memory leak on RADIUS accounting experiments are not conclusive this should be tried.next-stable-2.6https://gitlab.isc.org/isc-projects/kea/-/issues/2002LQ tests too strict (off by 1 failure)2022-11-02T15:10:40ZTomek MrugalskiLQ tests too strict (off by 1 failure)On one case lease query premium tests failed with the following error:
```
08:16:19 [ RUN ] LeaseQueryImpl6ProcessTest.queryByClientIdActiveLeases
08:16:19 ../../../../../../../../premium/src/hooks/dhcp/lease_query/tests/lease_qu...On one case lease query premium tests failed with the following error:
```
08:16:19 [ RUN ] LeaseQueryImpl6ProcessTest.queryByClientIdActiveLeases
08:16:19 ../../../../../../../../premium/src/hooks/dhcp/lease_query/tests/lease_query_impl6_unittest.cc:1585: Failure
08:16:19 Expected equality of these values:
08:16:19 100
08:16:19 cltt_opt->getValue()
08:16:19 Which is: 101
08:16:19 ../../../../../../../../premium/src/hooks/dhcp/lease_query/tests/lease_query_impl6_unittest.cc:401: Failure
08:16:19 Expected equality of these values:
08:16:19 lease->valid_lft_ - elapsed
08:16:19 Which is: 3500
08:16:19 iaaddr_opt->getValid()
08:16:19 Which is: 3499
08:16:19 ../../../../../../../../premium/src/hooks/dhcp/lease_query/tests/lease_query_impl6_unittest.cc:402: Failure
08:16:19 Expected equality of these values:
08:16:19 lease->preferred_lft_ - elapsed
08:16:19 Which is: 3500
08:16:19 iaaddr_opt->getPreferred()
08:16:19 Which is: 3499
08:16:19 ../../../../../../../../premium/src/hooks/dhcp/lease_query/tests/lease_query_impl6_unittest.cc:417: Failure
08:16:19 Expected equality of these values:
08:16:19 lease->valid_lft_ - elapsed
08:16:19 Which is: 3400
08:16:19 iaprefix_opt->getValid()
08:16:19 Which is: 3399
08:16:19 ../../../../../../../../premium/src/hooks/dhcp/lease_query/tests/lease_query_impl6_unittest.cc:418: Failure
08:16:19 Expected equality of these values:
08:16:19 lease->preferred_lft_ - elapsed
08:16:19 Which is: 3400
08:16:19 iaprefix_opt->getPreferred()
08:16:19 Which is: 3399
08:16:19 [ FAILED ] LeaseQueryImpl6ProcessTest.queryByClientIdActiveLeases (1 ms)
```
Details: [jenkins](https://jenkins.aws.isc.org/job/kea-dev/job/distcheck/477/execution/node/187/log/?consoleFull)
This looks like a timing error that, depending on when exactly the code get run, the values may be off by 1.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/1868forensic logging: renewals are logged as assignments2022-11-02T15:10:19ZAndrei Pavelandrei@isc.orgforensic logging: renewals are logged as assignmentsFor `n` subsequent DHCPREQUESTs or DHCPv6_REQUESTSs:
| v | v | log |
| ------ | -- | ------------------------------------------------------ |
| 1.9.7 | v4 | 1 * `has been assigne...For `n` subsequent DHCPREQUESTs or DHCPv6_REQUESTSs:
| v | v | log |
| ------ | -- | ------------------------------------------------------ |
| 1.9.7 | v4 | 1 * `has been assigned` + (n - 1) * `has been renewed` |
| 1.9.7 | v6 | 1 * `has been assigned` |
| 1.9.8+ | v4 | n * `has been assigned` |
| 1.9.8+ | v6 | n * `has been assigned` |
The inconsistency of `n - 1` missing renewal messages in v6 has been fixed in 1.9.8. But they are now shown as assignments instead of renewals. I think the behavior in 1.9.7 for v4 is what we need now for both v4 and v6.
DHCPV6_RENEWs and subsequent DHCPV6_REQUESTs are both logged as `has been assigned`. The message type should not make a difference. The behavior in 1.9.7 where only the state of the lease was being taken into account seems better to me, and so they should both say `has been renewed`.backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/1092legal logging hook should save state of lease added via lease4/6-add commands2022-11-02T15:10:19ZWlodzimierz Wencellegal logging hook should save state of lease added via lease4/6-add commandsFound out while I was working on isc-projects/kea#1022
Lease4/6-add commands are related to legal logging hook. If administrator is able to add lease with different states - it should be logged when legal logging hook is enabled. e.g.:
...Found out while I was working on isc-projects/kea#1022
Lease4/6-add commands are related to legal logging hook. If administrator is able to add lease with different states - it should be logged when legal logging hook is enabled. e.g.:
commands and result:
```
'{"command": "lease6-add","arguments": {"state": 2, "subnet-id": 1,"ip-address": "2001:db8:1::1","duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24","iaid": 1234}}'
{
"result": 0,
"text": "Lease for address 2001:db8:1::1, subnet-id 1 added."
}
'{"command": "lease6-add","arguments": {"state": 1, "subnet-id": 1,"ip-address": "2001:db8:1::2","duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24","iaid": 1234}}'
{
"result": 0,
"text": "Lease for address 2001:db8:1::2, subnet-id 1 added."
}
'{"command": "lease6-add","arguments": {"state": 0, "subnet-id": 1,"ip-address": "2001:db8:1::3","duid": "1a:1b:1c:1d:1e:1f:20:21:22:23:24","iaid": 1234}}'
{
"result": 0,
"text": "Lease for address 2001:db8:1::3, subnet-id 1 added."
}
```
and even if we added 3 different leases, legal logging saved this:
```
2020-01-24 05:49:42 PST Administrator added a lease of address: 2001:db8:1::1 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24
2020-01-24 05:49:42 PST Administrator added a lease of address: 2001:db8:1::2 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24
2020-01-24 05:49:42 PST Administrator added a lease of address: 2001:db8:1::3 to a device with DUID: 1a:1b:1c:1d:1e:1f:20:21:22:23:24
```backloghttps://gitlab.isc.org/isc-projects/kea/-/issues/2523More libload unit tests for premium hooks2022-09-01T13:33:10ZFrancis DupontMore libload unit tests for premium hooks#2235 added new libload unit tests checking if a hook is used with the right server but for hooks registering new commands (the common case for these new tests) it is interesting (and easy) too to check if the commands are correctly regi...#2235 added new libload unit tests checking if a hook is used with the right server but for hooks registering new commands (the common case for these new tests) it is interesting (and easy) too to check if the commands are correctly registered after load and not registered before load and after unload.outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/723Missing CB entry for deleting all global options2021-10-20T09:47:17ZFrancis DupontMissing CB entry for deleting all global optionsObviously either we have to add a deleteAllOptions4 or remove `remote-option4-global-del-all` from the design. Note as the CB command is starred this should be postponed...Obviously either we have to add a deleteAllOptions4 or remove `remote-option4-global-del-all` from the design. Note as the CB command is starred this should be postponed...outstandinghttps://gitlab.isc.org/isc-projects/kea/-/issues/450Populate log messages from the cb_cmds to the database2020-09-10T15:50:03ZMarcin SiodelskiPopulate log messages from the cb_cmds to the databaseAssuming that we do #449, we then have to extend the cb_cmds hooks library to actually use the log messages conveyed in the control commands to the database through the AuditRevision objects.Assuming that we do #449, we then have to extend the cb_cmds hooks library to actually use the log messages conveyed in the control commands to the database through the AuditRevision objects.outstanding