infix icon indicating copy to clipboard operation
infix copied to clipboard

Refactor sysrepo-load-modules.sh and extract modules.state

Open troglobit opened this issue 1 year ago • 0 comments

A great improvement in Infix of late, was when the bootstrapping of YANG modules was moved from runtime (on the device) to build time. As a spin-off we gained early detection of model issues -- not having to face a surprise when eventually starting up a device, and quicker device startup time.

After a few months now with this improvement in place we see other areas of improvement:

  • Updating a model and reloading it into pre-runtime target datastores is fragile
    • multiple model updates, without upping the file date, does not take
    • sometimes model dependencies prevent reloading, leading to a distclean rebuild
  • With an increase in static factory-confing.cfg in the tree, we need a linter at build time

Hence, a retake is necessary for increased efficiency, reliability, and add more features.

  1. We need to refactor the sysrepo-load-modules.sh script, basically rewrite it without the Netopeer2 legacy
  2. When a developer does make confd-rebuild all modules should be reloaded, hence confd needs to "own" all modules, not spread out in sysrepo, netopeer2/libnetconf2, and rousette
  3. With that in place, the script could do a: sysrepocfg -X -f json -d operational -x /modules-state > modules-state.json

troglobit avatar Oct 24 '24 10:10 troglobit