Page MenuHomeVyOS Platform

BGP conf_mode unable to delete configuration with peer-group
Closed, ResolvedPublicBUG

Description

Unable to delete protocol bgp configuration if it uses "peer-group".
To reproduce.

set protocols bgp 65001 neighbor 10.0.0.2 interface peer-group 'foo'
set protocols bgp 65001 neighbor 10.0.0.2 interface remote-as '65002'
set protocols bgp 65001 peer-group foo
commit

vyos@r4-roll# delete protocols bgp 
[edit]
vyos@r4-roll# commit
[ protocols bgp 65001 ]
% Create the bgp interface first
Error configuring routing subsystem.  See log for more detailed information

[edit]
vyos@r4-roll#

Vtysh

!
router bgp 65001
 neighbor foo peer-group
!

Or 'internal' or 'external' param

set protocols bgp 65001 neighbor 10.0.0.2 interface peer-group 'foo'
set protocols bgp 65001 neighbor 10.0.0.2 interface remote-as 'internal'
set protocols bgp 65001 peer-group foo
commit

vyos@r4-roll# commit
[ protocols bgp 65001 ]
% Create the bgp interface first
Error configuring routing subsystem.  See log for more detailed information

[edit]
vyos@r4-roll#

Vtysh

!
router bgp 65001
 neighbor foo peer-group
!

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202008260118
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

c-po added a subscriber: c-po.

Issue no longer persists in VyOS 1.4. Tested using: 1.4-rolling-20210214

A possible reason it tried to remove " neighbor 10.0.0.2 remote-as 65002" after " neighbor 10.0.0.2 interface peer-group foo"
But if we delete " neighbor 10.0.0.2 interface peer-group foo" it also delete and "" neighbor 10.0.0.2 remote-as 65002"
So it can't delete this string

!
router bgp 65001
 neighbor foo peer-group
 neighbor 10.0.0.2 interface peer-group foo
 neighbor 10.0.0.2 remote-as 65002
!

Delete manual

r4-1.3# conf t
r4-1.3(config)# router bgp 
r4-1.3(config-router)# no  neighbor 10.0.0.2 interface peer-group foo
r4-1.3(config-router)# 
r4-1.3(config-router)# do show run
!
router bgp 65001
 neighbor foo peer-group
!
line vty
!
end
r4-1.3(config-router)#

Trying to delete the second line (which already deleted)

[email protected]# vtysh -c "configure terminal" -c "router bgp 65001" -c "no neighbor 10.0.0.2 interface remote-as internal"
% Create the bgp interface first
[edit]
[email protected]#
erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 1:15 PM
erkin removed a subscriber: Active contributors.

Tested in VyOS 1.4-rolling-202311100309
The configuration:
VyOS:

set protocols bgp address-family ipv4-unicast network 10.0.11.0/24
set protocols bgp neighbor 10.55.8.242 address-family ipv4-unicast soft-reconfiguration inbound
set protocols bgp neighbor 10.55.8.242 peer-group 'foo'
set protocols bgp neighbor 10.55.8.242 remote-as '65002'
set protocols bgp parameters router-id '10.55.8.241'
set protocols bgp peer-group foo
set protocols bgp system-as '65001'

FRR

router bgp 65001
 bgp router-id 10.55.8.241
 no bgp ebgp-requires-policy
 no bgp default ipv4-unicast
 no bgp network import-check
 neighbor foo peer-group
 neighbor 10.55.8.242 remote-as 65002
 neighbor 10.55.8.242 peer-group foo 
!
 address-family ipv4 unicast
  network 10.0.11.0/24
  neighbor 10.55.8.242 activate
  neighbor 10.55.8.242 soft-reconfiguration inbound
 exit-address-family

Deleting the peer-group from the neighbor:

vyos@vyos# delete protocols bgp neighbor 10.55.8.242 peer-group
[edit]
vyos@vyos# commit
[edit]

FRR:

router bgp 65001
 bgp router-id 10.55.8.241
 no bgp ebgp-requires-policy
 no bgp default ipv4-unicast
 no bgp network import-check
 neighbor foo peer-group
 neighbor 10.55.8.242 remote-as 65002
 !
 address-family ipv4 unicast
  network 10.0.11.0/24
  neighbor 10.55.8.242 activate
  neighbor 10.55.8.242 soft-reconfiguration inbound
 exit-address-family

Works as expected

dmbaturin claimed this task.
dmbaturin edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.3 Equuleus (1.3.6).