Page MenuHomeVyOS Platform

Use config_tree instead of legacy loadFile in vyos-load-config.py
On hold, NormalPublicFEATURE REQUEST

Description

Use config_tree diff instead of relying on legacy backend 'loadFile'.

Update: separating out the legacy diff algorithm requires relying on the cli_app functions 'my_set'/'my_delete' to re-insert the proposed config withing the legacy cstore structure --- this incurs a performance penalty ~3 times slower than the legacy loadFile. Two things to be clear on: (1) this experiment never pertained to config load on boot; that is a different mechanism; (2) the performance hit is due to moving to 'my_set'/'my_delete', not the diff algorithm itself.

Regarding (2), an experiment with batch set/delete operations:
https://github.com/vyos/vyatta-cfg/compare/current...jestabro:vyatta-cfg:cli_batch
gives negligible improvement, for an obvious reason: the one thing that the legacy diff algorithm does is produce internal Cpath structures representing set/delete commands; rebuilding those, even in batch operations, is time-consuming.

By contrast the replacement config diff algorithm is general, producing full trees which are needed for recursive diff utilities; to define a fundamental data structure for general use; and to produce generic set/delete commands for a cli.

The design of the config_tree diff algorithm takes an arbitrary diff function as argument, so the possibility of a legacy interface to mimic the construction of Cpath's is open, but for now, this work is on hold, in favor of:
(1) parse the output of loadFIle in order to address the missed errors discussed in T4382.
(2) Replace PR
https://github.com/vyos/vyos-1x/pull/1328
with just the first two commits that cover, respectively, clean up of component version IO; rewrite of save-config.

Details

Difficulty level
Easy (less than an hour)
Version
vyos-1.4, vyos-1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

jestabro triaged this task as Normal priority.Mar 9 2022, 4:58 PM
jestabro created this task.
jestabro created this object in space S1 VyOS Public.
jestabro changed the task status from Open to Backport candidate.Mar 9 2022, 5:02 PM
jestabro moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.

Re-open to investigate failure in vyos-configtest.

jestabro changed the task status from Backport candidate to Open.Mar 24 2022, 8:05 PM
jestabro changed the task status from Open to On hold.Jun 28 2022, 7:57 PM