Page MenuHomeVyOS Platform

route-map comm-list can't be used without option delete
Open, Requires assessmentPublicBUG

Description

Comm-list is used in FRR for deleting match communities.

To reproduce in 1.4

set policy community-list clist rule 10 action permit
set policy community-list clist rule 10 regex 111:222

set policy route-map test-rmap rule 10 action permit
set policy route-map test-rmap rule 10 set comm-list comm-list clist

Commit

frr-reload output:   4 2021-07-30 15:50:09,040   ERROR: vtysh failed to process new configuration: vtysh (mark file) exited with status 4:
frr-reload output:   5 b'line 18: % Command incomplete:  set comm-list clist \n\n'
frr-reload output:   6 2021-07-30 15:50:09,125 DEBUG: New Frr Config


Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/policy.py", line 222, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/policy.py", line 194, in apply
    frr_cfg.commit_configuration(bgp_daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 458, in commit_configuration
    reload_configuration('\n'.join(self.config), daemon=daemon)
  File "/usr/lib/python3/dist-packages/vyos/frr.py", line 206, in reload_configuration
    raise CommitError('FRR configuration failed while running commit. Please ' \
vyos.frr.CommitError: FRR configuration failed while running commit. Please enable debugging to examine logs.

To fix it FRR required parameter delete

set policy route-map test-rmap rule 10 set comm-list delete

For 1.3 another bug, can't delete policy if "comm-list" exists in the configuration

set policy community-list clist rule 10 action permit
set policy community-list clist rule 10 regex 111:222
set policy route-map test-rmap rule 10 action permit
set policy route-map test-rmap rule 10 set comm-list comm-list clist
set policy route-map test-rmap rule 10 set comm-list delete
commit

Delete policy

vyos@r4-1.3# delete policy 
[edit]
vyos@r4-1.3# commit
[ policy route-map test-rmap rule 10 set comm-list ]
You must configure a comm-list

delete [ policy route-map test-rmap ] failed
[[]] failed
Commit failed
copy failed [/opt/vyatta/config/tmp/tmp_1747/work/.unionfs-fuse][/opt/vyatta/config/tmp/new_config_1747/.unionfs-fuse]
Failed to generate committed config
[edit]
vyos@r4-1.3#

Details

Difficulty level
Normal (likely a few hours)
Version
1.3.0-rc5/1.4-rolling-202107242017
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

It's not a bug, it's simply a weird syntax. That command could never be used without the delete option, so your config example wouldn't work in 1.2 or 1.1.8 either.

It works if you add set policy route-map test-rmap rule 10 set comm-list delete.

I believe we should change it to something like set policy route-map test-rmap rule 10 delete community community-list $listName.