Page MenuHomeVyOS Platform

Remove trivial redundancies in calls to config dependency scripts
Closed, ResolvedPublicBUG

Description

This task address the simplest case of T5660: trivial redundancies arising from the need to define dependencies in the general case --- the graph defined by
https://github.com/vyos/vyos-1x/blob/current/data/config-mode-dependencies/vyos-1x.json
---and the use of dependencies for a specific config, which may trigger multiple overlapping conditions.

A simple example is in
https://github.com/vyos/vyos-1x/blob/current/src/conf_mode/firewall.py#L137-L145
dependencies are set in the case of 'group-resync', and always set for 'conntrack'. If one has a config triggering both, the resulting dependency list is:
set_dependents: caller firewall, dependents ['conntrack', 'nat', 'policy-route'] <-- from set_dependents('group_resync', conf)
set_dependents: caller firewall, dependents ['conntrack', 'nat', 'policy-route', 'conntrack'] <-- redundancy added from set_dependents('conntrack', conf)

It is preferable that the author of a config-mode script not try to manage dependency logic with script logic, but rather that the resulting list is dynamically pruned before being called, resulting in:
call_dependents: caller firewall, dependents ['nat', 'policy-route', 'conntrack']

The remaining sources of redundancies will be detailed in the parent task T5660.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

jestabro triaged this task as Normal priority.Dec 19 2023, 7:59 PM
jestabro created this task.
jestabro created this object in space S1 VyOS Public.
jestabro changed the task status from Open to Needs testing.Feb 29 2024, 1:10 PM
jestabro changed the task status from Needs testing to Backport candidate.Thu, Apr 25, 2:48 PM