Page MenuHomeVyOS Platform

Impossible to delete protocols OSPF under VRF
Open, NormalPublicBUG

Description

Impossible to delete protocols under VRF.
To reproduce:

set interfaces dummy dum0 address '100.64.0.254/32'
set interfaces dummy dum0 vrf 'ospf'
set interfaces ethernet eth1 address '10.0.0.254/24'
set interfaces ethernet eth1 vrf 'ospf'
set vrf name ospf protocols ospf interface dum0 area '0'
set vrf name ospf protocols ospf interface eth1 area '0'
set vrf name ospf protocols ospf parameters router-id '100.64.0.254'
set vrf name ospf table '101'
commit


delete vrf name ospf protocols
commit

commit:

vyos@r14# delete vrf name ospf protocols
[edit]
vyos@r14# commit
[ vrf name ospf protocols ospf ]
Traceback (most recent call last):
  File "/usr/libexec/vyos/services/vyos-configd", line 143, in run_script
    c = script.get_config(config)
        ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos//conf_mode/protocols_ospf.py", line 41, in get_config
    return get_frrender_dict(conf, argv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/frrender.py", line 530, in get_frrender_dict
    vrf['name'][vrf_name]['protocols'].update({'ospf' : {'deleted' : ''}})
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'protocols'

delete [ vrf name ospf protocols ospf ] failed
[[vrf]] failed
Commit failed
[edit]
vyos@r14#

Details

Version
VyOS 2025.03.15-0018-rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)
Story points
3

Event Timeline

Viacheslav renamed this task from Impossible to delete protocols under VRF to Impossible to delete protocols OSPF under VRF .
Viacheslav triaged this task as Normal priority.

for me on VyOS 1.5-rolling-202503030030 it works if you first remove the ospf configuration, then delete the protocols:

delete vrf name ospf protocols ospf
delete vrf name ospf protocols