DATABASE_TO_JSON_ERROR due to !1887 (unknown element in hosts-database/config-database: read-timeout and write-timeout)
!1887 (merged) added read-timeout
and write-timeout
fields without updating src/lib/database/database_connection.cc
. This results in the following error message in kea-dhcp4.log when issuing config-get
through kea-shell:
2023-01-30 10:23:04.893 ERROR [kea-dhcp4.database/1441.140255010749440] DATABASE_TO_JSON_ERROR Internal logic error: unknown unknown element found in state: read-timeout @@Missing logger placeholder '%3' for value '2'@@
2023-01-30 10:23:04.893 ERROR [kea-dhcp4.database/1441.140255010749440] DATABASE_TO_JSON_ERROR Internal logic error: unknown unknown element found in state: write-timeout @@Missing logger placeholder '%3' for value '2'@@
2023-01-30 10:23:04.893 ERROR [kea-dhcp4.database/1441.140255010749440] DATABASE_TO_JSON_ERROR Internal logic error: unknown unknown element found in state: read-timeout @@Missing logger placeholder '%3' for value '2'@@
2023-01-30 10:23:04.893 ERROR [kea-dhcp4.database/1441.140255010749440] DATABASE_TO_JSON_ERROR Internal logic error: unknown unknown element found in state: write-timeout @@Missing logger placeholder '%3' for value '2'@@
I believe this could be fixed by adding these keywords to https://gitlab.isc.org/isc-projects/kea/-/blob/master/src/lib/database/database_connection.cc#L226-231, but I did not have time to test this yet. This will also need to be ported to my !1907 (closed), once it is in master.
Config needed for reproduction:
{
"Dhcp4": {
"hosts-database": {
"type": "mysql",
"read-timeout": 2,
"write-timeout": 2
},
"config-control": {
"config-databases": [
{
"type": "mysql",
"read-timeout": 2,
"write-timeout": 2
}
]
}
}
Expected results:
- the exported config should match the input.
Actual results:
-
read-timeout
andwrite-timeout
of both sections will be missing on the configuration exported withconfig-get
.