Page MenuHomeVyOS Platform

Ability to remove a VRF that has a next-hop-vrf as target
Closed, ResolvedPublicBUG

Description

There is a bug when deleting a VRF that is the target in a next-hop-vrf.

Steps to reproduce

1: Create VRF

set vrf name Red table 10000
set vrf name Blue table 10001

2: Add interfaces

set interfaces dummy dum10000 address 2001:470:dd54:F0A::1/64
set interfaces dummy dum10000 vrf Red
set interfaces dummy dum10001 address 2001:470:dd54:F0B::1/64
set interfaces dummy dum10001 vrf Blue

3: Add Inter-VRF route from Red to Blue

set protocols vrf Red static route6 ::/0 next-hop 2001:470:dd54:F0A::2 interface dum10001

4: Delete interfaces

delete interfaces dummy dum10000
delete interfaces dummy dum10001

5: Delete VRF Blue

delete vrf name Blue

6: Create VRF Blue again

set vrf name Blue table 10001

returns

[ vrf ]
RTNETLINK answers: File exists
Error changing VRF: Command '['ip', '-4', 'route', 'add', 'vrf', 'Blue', 'unreachable', 'default', 'metric', '4278198272']' returned non-zero exit status 2.

[[vrf]] failed
Commit failed

7: Delete Inter-VRF route from Red to Blue

delete protocols vrf Red

returns

vyos@v6-router-one# delete protocols vrf Red
[edit]
vyos@v6-router-one# commit
[ protocols vrf Red static route6 ::/0 next-hop 2001:470:dd54:F0A::2 ]
% Command incomplete: no

delete [ protocols vrf Red static route6 ::/0 ] failed
delete [ protocols vrf Red static ] failed
[[]] failed
Commit failed

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202004031458
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Raeven created this task.

That should actually not be possible with the verify() step - looks like a bug in the code

erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 7:41 AM
erkin removed a subscriber: Active contributors.