Page MenuHomeVyOS Platform

BGP community-list unknown command
Closed, ResolvedPublicBUG

Description

When adding a community, an error "Can't find community-list" is displayed.

set policy community-list COM01 rule 10 action permit 
set policy community-list COM01 rule 10 regex 65001:0

[email protected]# commit
[ policy community-list COM01 ]
% Can't find community-list

[edit]

But the community is being added.
Vtysh.

!
bgp community-list expanded COM01 permit 65001:0
!

Similar with extcommunity-list

set policy extcommunity-list EXTCOM01 rule 10 action 'permit'
set policy extcommunity-list EXTCOM01 rule 10 regex '65001:0:65002'

[email protected]# commit
[ policy extcommunity-list EXTCOM01 ]
% Unknown command: no bgp extcommunity-list expanded EXTCOM01 % Command incomplete: show bgp extcommunity-list EXTCOM01

[edit]
[email protected]#

Another bug with delete

delete policy large-community-list

[email protected]# commit
[ policy extcommunity-list EXTCOM01 ]
% Unknown command: no bgp extcommunity-list expanded EXTCOM01 % Command incomplete: show bgp extcommunity-list EXTCOM01

[edit]
[email protected]#

Details

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

Event Timeline

zsdc changed the task status from Open to Confirmed.May 9 2020, 8:43 AM
zsdc triaged this task as Unbreak Now! priority.
zsdc added a subscriber: zsdc.

The bug is produced because of deleted deprecated option in vtysh. Before FRR 7.3:

[email protected]:/home/vyos# vtysh -c "show ip community-list 10"
This config option is deprecated, and is scheduled for removal.
if you are using this please migrate to the below command.
'show bgp community-list <(1-500)|WORD> detail'
% Can't find community-list

Starting from 7.3:

[email protected]:/home/vyos# vtysh -c "show ip community-list 10"
% Unknown command: show ip community-list 10

We use grep for checking if community already exist: https://github.com/vyos/vyatta-cfg-quagga/blob/a7c1adbf93e6464f874a80eafe3515380c149d48/scripts/policy/vyatta-policy.pl#L49-L60
Therefore, in FRR 7.3 this check will always return positive result and configuration script try to delete nonexistent community list.

PR https://github.com/vyos/vyatta-cfg-quagga/pull/47
for 1.2 and 1.3.

[email protected]# set policy community-list COM01 rule 10 action permit 
[edit]
[email protected]# set policy community-list COM01 rule 10 regex 65001:0
[edit]
[email protected]# commit
[edit]
[email protected]#
set policy community-list COM01 rule 10 action permit 
set policy community-list COM01 rule 10 regex 65001:0
commit
[edit]
[email protected]#

commit without errors

vtysh -c "show run"
!
bgp community-list expanded COM01 permit 65001:0
!

Try delete community-list

[email protected]# delete policy 
[edit]
[email protected]# commit
[edit]
[email protected]#

Community list continues to be in frr configuration

[email protected]# vtysh -c "show run"
!
bgp community-list expanded COM01 permit 65001:0
!

Bug with FRRouting 7.3.1

[email protected]:~$ vtysh -c "show bgp community-list COM01"
Default BGP instance not found
[email protected]:~$ vtysh -c "show bgp community-list COM01 detail"
Named Community expanded list COM01
    permit 65001:0
[email protected]:~$

Issue
ref. https://frrouting.slack.com/archives/C58SZTP39/p1590405898278400
ref. https://github.com/FRRouting/frr/issues/6470

PR https://github.com/vyos/vyatta-cfg-quagga/pull/49

fix add and delete community/extcommunity-lists

set policy community-list COM01 rule 10 action 'permit'
set policy community-list COM01 rule 10 regex '65001:0'

set policy extcommunity-list EXTCOM01 rule 10 action 'permit'
set policy extcommunity-list EXTCOM01 rule 10 regex '65001:0:65002'

set policy large-community-list LARGE01 rule 10 action 'permit'
set policy large-community-list LARGE01 rule 10 regex '65001:2:4'

[email protected]# commit
[edit]
[email protected]#

Delete without errors

[email protected]# delete policy 
[edit]
[email protected]# commit
[edit]
[email protected]#
Viacheslav changed the task status from Confirmed to Backport candidate.Jun 7 2020, 9:37 AM
c-po removed a project: Ready for Crux (1.2.x).
c-po moved this task from Needs Triage to Finished on the VyOS 1.2 Crux (VyOS 1.2.6) board.
erkin renamed this task from BGP community-list error to BGP community-list unknown command.Sep 9 2020, 12:52 PM