Page MenuHomeVyOS Platform

BGP conf_mode unable to delete configuration with peer-group
Open, Requires assessmentPublicBUG

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

[email protected]# delete protocols bgp 
[edit]
[email protected]# commit
[ protocols bgp 65001 ]
% Create the bgp interface first
Error configuring routing subsystem.  See log for more detailed information

[edit]
[email protected]#

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

[email protected]# commit
[ protocols bgp 65001 ]
% Create the bgp interface first
Error configuring routing subsystem.  See log for more detailed information

[edit]
[email protected]#

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.