Page MenuHomeVyOS Platform

Replacing legacy loadFile exposes missing steps in migration scripts and other errors
Closed, ResolvedPublicBUG

Description

Task T4295 proposes to replace the use of the legacy vyatta backend loadFile command within the vyos-load-config.py script. The approach is as follows: we separate the concerns of two legacy subsystems, the vyatta config diff algorithm, and the vyatta set/delete command subsystem. We replace the former diff algorithm with a revised algorithm operating on the config_tree date structure (T4235); the resulting diff is then fed into the set/delete command subsystem within the CLI.

This however exposes existing errors in migration scripts, as the validation system for set/delete commands is strict, as compared to the legacy loadFile operation which will print errors, but treat them as non-fatal, allowing a subsequent commit to succeed while suppressing any offending paths.

A simple example is seen in the smoketest configtest config 'bgp-azure-ipsec-gateway':
The ipsec migration script 5-to-6 will move 'vpn ipsec ipec-interfaces inteface', but leave the (now empty) path 'vpn ipsec ipsec-interfaces'. For the legacy loadFile, this is reported, non-fatal, and the path is ignored; as migrated set/delete commands, it is fatal.

The planned and required revisions are desirable: (1) replace the legacy algortihm in config loading, which allows for future development (2) resolve missing details in migration scripts, since strict validation will be the standard going forward.

Details

Difficulty level
Hard (possibly days)
Version
vyos-1.4
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Stricter validation
Issue type
Internal change (not visible to end users)

Event Timeline

jestabro changed the task status from Open to Confirmed.Apr 20 2022, 8:25 PM
jestabro triaged this task as Normal priority.
jestabro created this task.
jestabro created this object in space S1 VyOS Public.
jestabro updated the task description. (Show Details)
jestabro renamed this task from Replacing legacy loadFile exposes missing steps in migration scripts to Replacing legacy loadFile exposes missing steps in migration scripts and other errors.May 25 2022, 4:46 PM
jestabro moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.