Page MenuHomeVyOS Platform

Use config_tree instead of legacy loadFile in vyos-load-config.py
Not ApplicablePublicFEATURE 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

Version
vyos-1.4, vyos-1.3
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.
jestabro created this object in space S1 VyOS Public.
jestabro closed this task as Unknown Status.Mar 9 2022, 5:02 PM
jestabro moved this task from Open to Finished on the VyOS 1.4 Sagitta board.

Re-open to investigate failure in vyos-configtest.

jestabro changed the task status from Open to On hold.Jun 28 2022, 7:57 PM
jestabro closed this task as Not Applicable.EditedJan 16 2024, 3:34 AM

Closed; work continues in T5528.