Page MenuHomeVyOS Platform

Collisions in transcluded interface-definition files can obscure data in a few cases
Closed, ResolvedPublicBUG

Description

Work on T8360 uncovered a few cases where inconsistencies across included interface-definition files results in incorrect XML properties elements, at least when building command templates.
A simple example is here:
https://github.com/vyos/vyos-1x/blob/current/interface-definitions/system_conntrack.xml.in#L87-L119
The first line is an unnecessary include of include/ip-protocol.xml.i --- it is unnecessary as it is followed by a full definition of that XML leaf node; it is in fact incorrect (and likely a typo), as scripts/build-command-templates will write the node.def file only on the first instance. (build-command-templates does this justifiably, as skeleton paths to the node may exist in subsequent includes, and should not overwrite the existing node.def). The result is missing completion help in the CLI for path [system, conntrack, ignore, ipv4, rule, protocol]
T8360 will allow overriding the help element of a node, however, in order to reliably merge node properties elements, we need to first resolve collisions, such as above.
A simple test script can be added to reveal collisions, and those interface-definition files corrected.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)