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

sever@r11# 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'

vyos@r-roll# commit
[ policy extcommunity-list EXTCOM01 ]
% Unknown command: no bgp extcommunity-list expanded EXTCOM01 % Command incomplete: show bgp extcommunity-list EXTCOM01

[edit]
vyos@r-roll#

Another bug with delete

delete policy large-community-list

vyos@r-roll# commit
[ policy extcommunity-list EXTCOM01 ]
% Unknown command: no bgp extcommunity-list expanded EXTCOM01 % Command incomplete: show bgp extcommunity-list EXTCOM01

[edit]
vyos@r-roll#

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 Urgent! priority.
zsdc subscribed.

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

root@vyos:/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:

root@vyos:/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.

vyos@r-roll# set policy community-list COM01 rule 10 action permit 
[edit]
vyos@r-roll# set policy community-list COM01 rule 10 regex 65001:0
[edit]
vyos@r-roll# commit
[edit]
vyos@r-roll#
set policy community-list COM01 rule 10 action permit 
set policy community-list COM01 rule 10 regex 65001:0
commit
[edit]
vyos@r-roll#

commit without errors

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

Try delete community-list

vyos@r-roll# delete policy 
[edit]
vyos@r-roll# commit
[edit]
vyos@r-roll#

Community list continues to be in frr configuration

vyos@r-roll# vtysh -c "show run"
!
bgp community-list expanded COM01 permit 65001:0
!

Bug with FRRouting 7.3.1

vyos@r-roll:~$ vtysh -c "show bgp community-list COM01"
Default BGP instance not found
vyos@r-roll:~$ vtysh -c "show bgp community-list COM01 detail"
Named Community expanded list COM01
    permit 65001:0
vyos@r-roll:~$

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'

vyos@r-roll# commit
[edit]
vyos@r-roll#

Delete without errors

vyos@r-roll# delete policy 
[edit]
vyos@r-roll# commit
[edit]
vyos@r-roll#
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