doc/examples/kea4/reservations.json is broken
Kea comes with many example configs. Sadly, at least one of them is broken:
The actual error is in this part:
{
"flex-id": "s0mEVaLue",
"ip-address": "192.0.2.206"
}
The flex-id
is expected to be hex string. The literal text should be double quoted ("'s0mEVaLue'"
).
Exact kea error is:
2022-07-05 11:51:22.908 ERROR [kea-dhcp4.dhcp4/95612.139801680786048] DHCP4_CONFIG_LOAD_FAIL configuration error using file: doc/examples/kea4/reservations.json, reason: invalid host identifier value 's0mEVaLue' (doc/examples/kea4/reservations.json:156:9)
This ticket is not just about fixing this one particular mistake, but coming up with a mechanism to verify that other examples are ok. We do have ParserTest.file in src/bin/dhcp{4,6}/tests/parser_unittest.cc that loads this particular broken config and it passes (as the text is a valid JSON).