Page MenuHomeVyOS Platform

Tag nodes are overwritten when configured by Cloud-Init from User-Data
Closed, ResolvedPublicBUG

Description

If we have more than one tag node inside the same top-level node, a new node overrides a previous one. For example:

#cloud-config
vyos_config_commands:
  - set vrf name customer table '150'
  - set vrf name customer protocols bgp address-family ipv4-unicast network '10.180.0.0/25'
  - set vrf name customer protocols bgp address-family ipv4-unicast network '10.180.2.0/24'
  - set vrf name customer protocols bgp system-as '65000'

After applying this User-Data, only the latest network will be put into the config.boot.

The problem exists because in the cc_vyos_userdata.py the replace=False is used only for multi nodes: https://github.com/vyos/vyos-cloud-init/blob/3e5ae5fe3b2038bb809ab267a945346cfe1d0d79/cloudinit/config/cc_vyos_userdata.py#L137

Tag nodes require the same replace=False to not overwrite neighbor nodes.

Details

Difficulty level
Easy (less than an hour)
Version
1.4-rolling-202212260706, 1.3.2
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Related Objects

Mentioned In
1.3.4