Config Review component needed: step 1(design)
While working on #433 (closed) (Stork not able to show stats if stat_cmds hook is not loaded), I realized that there will be many cases like this. Instead of adding specific check for this particular case, I think we need a new component that will do the Kea config inspection.
For the time being, the checks will be simple:
- if the stat_cmds hook is not loaded, show a note about missing statistics
The code should be written in a way that will be easily extensible with other checks in the future. If possible each entry should be shown as a separate line (maybe an itemized list?). In the far future, we'll probably extend this with a "fix" button that would improve the underlying condition.
Those are not necessarily warnings, more like notes. In many cases it's impossible to tell if certain aspect is a problem or not (e.g. the deployment may not use DB for storing reservations, so they don't care about host cmds). This shouldn't be alarmist.
Here's a bunch of potential things we may check here. Those are out of scope for this ticket. I'm putting them to give you a better perspective how to address the extensibility requirement:
- if the host_cmds hook is not loaded, show a note about being unable to monitor reservations in DB (not included in initial implementation)
- if there is only one subnet in a shared network, suggest disabling shared network;
- if there is in-pool reservation enabled, but there are no in-pool reservations, suggest out-of-pool as better performant;
- if there is custom option definition, but no option-data that uses it, suggest removing unused defintions;
- if there are subnets without any pools and no reservations, suggest removing unused subnets;
- inspect HA configs of both servers and make sure there are no discrepancies;
- it's possible to misconfigure ports in HA+MT configuration, so it's still connecting via CA rather than with DHCP directly.
The follow-up ticket with many more checkers expected is #611.