Page MenuHomeVyOS Platform

BGP route-reflector-client - 'peer_group_as' bug
Closed, ResolvedPublicBUG

Description

Hi, this is my first bug report, as I stumbled upon bug when deploying VyOS. This is me from https://www.reddit.com/r/vyos/comments/1kx58yk/vyos_bug_routereflectorclient/

vyos@vyos# commit
[ protocols bgp ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 144, in run_script
    script.verify(c)
  File "/usr/libexec/vyos//conf_mode/protocols_bgp.py", line 427, in verify
    if peer_group_as is None or (peer_group_as != 'internal' and peer_group_as != bgp['system_as']):
       ^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'peer_group_as' where it is not associated with a value

What happened that there was bug in 2021 when route-reflector-client couldn't be configured due peer_group_as variable not existing: https://vyos.dev/rVYOSONEXbaade8815bd18af7d0c64985fdb97bcad045432b

It was fixed, but later on, new bugfix broke route-reflector-client again, in this commit: https://vyos.dev/rVYOSONEX20887e6165c363062bd8edab40443f4ebc1b420f

To reproduce, you do basic iBGP setup with route-reflector

set protocols bgp neighbor 10.255.128.12 remote-as internal
set protocols bgp neighbor 10.255.128.12 bfd
set protocols bgp neighbor 10.255.128.12 address-family ipv4-unicast prefix-list import Permit_Prefix
set protocols bgp neighbor 10.255.128.12 address-family ipv4-unicast prefix-list export Permit_Prefix
set protocols bgp neighbor 10.255.128.12 address-family ipv4-unicast route-reflector-client

Version

Version:          VyOS 2025.05.26-0020-rolling
Release train:    current
Release flavor:   generic

Built by:         autobuild@vyos.net
Built on:         Mon 26 May 2025 00:20 UTC
Build UUID:       f156aa27-974f-45ef-bbca-3bfe04178636
Build commit ID:  bc77b388e7fe99

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest
Secure Boot:      n/a (BIOS)

Copyright:        VyOS maintainers and contributors

One day a programmer from York
started his own Vyatta fork.
Though he was a huge geek,
it still took him a week
to get the damn build scripts to work.

Details

Version
2025.05.26-0020-rolling
Is it a breaking change?
Config syntax change (migratable)
Issue type
Bug (incorrect behavior)