Include statements with non-JSON extensions in Kea CA config
Stork supports the include
statements in the Kea Control Agent configuration, but only if the included file has a .json
extension. Kea allows any extensions. If the Kea Control Agent configuration contains the include
statement with the non-JSON file, Stork throws an error and rejects the particular Kea.
The problem was reported on our mailing list on 2023-05-11:
The Stork Agent is not happy when a KEA configuration file has an include statement in it. This is the error I see on the syslog:
level="error" msg="Invalid Kea Control Agent config" file=" kea.go:215 " error="Cannot parse Kea Control Agent config file: problem parsing Kea configuration: invalid character '<' looking for beginning of object key string: invalid character '<' looking for beginning of object key string"
And the configuration file it is trying to read is starting as:
{ "Control-agent": { <?include "/mnt/data/etc/kea/local-ctrl-agent.include"?>
Hmm… KEA accepts the .include extension though, so shouldn’t Stork accept what KEA accepts?