declarative config - experiments with sysrepo
Problem statement
Current configuration is practically a Lua program, which is a nightmare for multiple reasons:
- non-programmers have hard time understanding what is going on
- Lua language makes it hard to detect mistakes in config
- run-time reconfiguration requires doing each change N times for N processes
- gathering statistics from multiple processes is total pain
- currently it exposes low-level stuff and it prone to crashes on invalid use (#182)
Experiment
Do some preliminary experiments with sysrepo and see if it improves situation sufficiently to make it worth investing into it more.
Objectives
- experimental mode - sysrepo must not become a hard dependency of Knot Resolver
- put as much code as possible into separate (and optional) module
- minimize code duplication
- current Lua config must work the same way as it did before, sysrepo only complements the Lua config
Once we have sufficient experience with implementation of sysrepo into kresd we will revisit pros and cons and decide what to do next.
Requirements for next stages
- sysrepo+libyang must be widely available in distros we care about
- sysrepo+libyang must be sufficiently stable
- sysrepo must allow us to build a new user interface with a reasonable complexity
Ideas to try
-
build module to translate sysrepo callbacks to Lua config calls -
build command line client which can display and edit declarative config in a text format (probably YAML to make it similar to Knot DNS)
Edited by Petr Špaček