Unable to remove rule from prefix-list

Hi all,

I just encountered the following bug on VyOS 1.3.0-rc3:
Say I have the following prefix-list:

set prefix-list internal rule 10 action 'permit'
set prefix-list internal rule 10 ge '16'
set prefix-list internal rule 10 le '16'
set prefix-list internal rule 10 prefix '10.0.0.0/8'
set prefix-list internal rule 20 action 'deny'
set prefix-list internal rule 20 ge '25'
set prefix-list internal rule 20 le '32'
set prefix-list internal rule 20 prefix '1.2.3.0/24'

If I try to delete rule 20 I get the following error:

vyos@r1# commit
[ policy prefix-list internal rule 20 ]
% Can't find specified prefix-list

[[policy prefix-list internal]] failed
Commit failed

This issue was already raised before in ⚓ T23 Unable to remove rule from prefix list and the workaround of readding, commit, removing, commit still works; but it seems like the underlying issue is not fixed, even though the Task is resolved.

I can’t reproduce it 1.3.0-rc6

vyos@r4-1.3# set policy prefix-list internal rule 10 action 'permit'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 10 ge '16'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 10 le '16'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 10 prefix '10.0.0.0/8'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 20 action 'deny'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 20 ge '25'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 20 le '32'
[edit]
vyos@r4-1.3# set policy prefix-list internal rule 20 prefix '1.2.3.0/24'
[edit]
vyos@r4-1.3# commit
[edit]
vyos@r4-1.3# delete policy prefix-list internal rule 20
[edit]
vyos@r4-1.3# commit
[edit]
vyos@r4-1.3#

Hm, just tried various combinations of adding and deleting rules, changing prefixes, etc. and I’m not able to reproduce it anymore either… I guess there were just some weird leftovers in my installation. Thanks for checking!