Page MenuHomeVyOS Platform

OSPFv3 redistribute configuration remains in frr running config after removal
Closed, InvalidPublicBUG

Description

I created route redistribution configuration like this:

r3# show protocols ospfv3 
 area 0 {
     interface tun31
     interface eth1
     interface wg36
     interface lo
     interface eth0
     interface wg340
     interface wg341
 }
 area 100 {
     interface wg32
 }
 parameters {
     router-id 23.153.128.33
 }
 redistribute {
     bgp {
         route-map ALLOW-DEFAULT-ROUTE-IPV6
     }
     static {
         route-map ALLOW-DEFAULT-ROUTE-IPV6
     }
 }

then I've deleted the static map

delete protocols ospfv3 redistribute static
commit
save

however, the deleted configuration still lingering in frr:

!
router ospf6
 ospf6 router-id 23.153.128.33
 redistribute static route-map ALLOW-DEFAULT-ROUTE-IPV6
 redistribute bgp route-map ALLOW-DEFAULT-ROUTE-IPV6
 interface tun31 area 0
 interface wg34 area 0
 interface eth1 area 0
 interface wg36 area 0
 interface lo area 0
 interface eth0 area 0
 interface wg340 area 0
 interface wg341 area 0
 interface wg32 area 100
!

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202105011026
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

I can't reproduce it VyOS 1.3-rolling-202105011026

VyOS config:

set protocols ospfv3 area 0 interface 'eth1'
set protocols ospfv3 area 100 interface 'eth0'
set protocols ospfv3 redistribute bgp route-map 'FOO'
set protocols ospfv3 redistribute connected route-map 'FOO'
set protocols ospfv3 redistribute static route-map 'FOO'

Delete connected/static

vyos@r1-roll# delete protocols ospfv3 redistribute static 
[edit]
vyos@r1-roll# delete protocols ospfv3 redistribute connected 
[edit]
vyos@r1-roll# commit
[edit]
vyos@r1-roll#

FRR

!
router ospf6
 redistribute bgp route-map FOO
 interface eth1 area 0
 interface eth0 area 100
!
route-map FOO permit 10
!

Hmm, I still have it in my running-config. Is there a way to force config regeneration?

show conf com | match ospfv3

Copy configuration.
Delete protocols ospfv3
commit
re-add ospf config.

I think I found a way to reproduce it:

  • rename an interface that was previously included in ospfv3 configuration and then remove it in the same commit from ospfv3 in the same commit.
  • get an error that interface is not found. I think that at this stage the configuration is applied only partially
  • after that error configuration in frr and vyos goes out of sync and never unsynchronized unless forced (or by lucky accident :-)

So the root cause is "deleting interface and modifying ospfv3 in the same commit".

I did some more digging and found a reliable way of reproducing it:

  1. Create ospfv3 configuration with redistribute statement:
r6# show protocols ospfv3 
 area 0 {
     interface lo
     interface wg64
     interface eth0
     interface wg624
     interface wg63
 }
 parameters {
     router-id 23.153.128.17
 }
 redistribute {
     static {
         route-map ALLOW-DEFAULT-ROUTE-IPV6
     }
 }

the corresponding configuration in vtysh looks fine:

!
router ospf6
 ospf6 router-id 23.153.128.17
 redistribute static route-map ALLOW-DEFAULT-ROUTE-IPV6
 interface lo area 0
 interface wg64 area 0
 interface eth0 area 0
 interface wg624 area 0
 interface wg63 area 0
!
  1. Update route redistribution configuration:
6# show
 area 0 {
     interface lo
     interface wg64
     interface eth0
     interface wg624
     interface wg63
 }
 parameters {
     router-id 23.153.128.17
 }
 redistribute {
+    bgp {
+        route-map ALLOW-DEFAULT-ROUTE-IPV6
+    }
-    static {
-        route-map ALLOW-DEFAULT-ROUTE-IPV6
-    }
 }
[edit protocols ospfv3]
dtoubelis@r6# commit
[ protocols ospfv3 ]
For this router-id change to take effect, save config and restart ospf6d

[edit protocols ospfv3]

The corresponding config in vtysh looks okay so far:

!
router ospf6
 ospf6 router-id 23.153.128.17
 redistribute bgp route-map ALLOW-DEFAULT-ROUTE-IPV6
 interface lo area 0
 interface wg64 area 0
 interface eth0 area 0
 interface wg624 area 0
 interface wg63 area 0
!
  1. Restart ospf6d as requested:
r6:~$ restart frr ospf6d 
WARNING: This is a potentially unsafe function! You may lose the connection to the router or active configuration after running this command. Use it at your own risk! Continue? [y/N]: y

and now things get messed up:

!
router ospf6
 ospf6 router-id 23.153.128.17
 redistribute static route-map ALLOW-DEFAULT-ROUTE-IPV6
 redistribute bgp route-map ALLOW-DEFAULT-ROUTE-IPV6
 interface lo area 0
 interface wg64 area 0
 interface eth0 area 0
 interface wg624 area 0
 interface wg63 area 0
!

Sod for some reason, redistribute configuration is re-added after ospf6d restart.

BTW, the same happens when adding/removing interfaces to an area.

I can't reproduce it in 1.3-rc4

vyos@r4-1.3# run show conf com | match ospf
set protocols ospfv3 area 0 interface 'lo'
set protocols ospfv3 area 0 interface 'eth0'
set protocols ospfv3 area 0 interface 'eth1'
set protocols ospfv3 parameters router-id '1.2.3.4'
set protocols ospfv3 redistribute static route-map 'FOO'
[edit]
vyos@r4-1.3#

Check vtysh config before and after restart

vyos@r4-1.3# set protocols ospfv3 redistribute bgp route-map FOO
[edit]
vyos@r4-1.3# del protocols ospfv3 redistribute static 
[edit]
vyos@r4-1.3# commit
[edit]
vyos@r4-1.3# vtysh

Hello, this is FRRouting (version 7.3.1-20210418-00-g9ab93ffc7).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

r4-1.3# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1-20210418-00-g9ab93ffc7
frr defaults traditional
hostname r4-1.3
log syslog
log facility local7
service integrated-vtysh-config
!
router ospf6
 ospf6 router-id 1.2.3.4
 redistribute bgp route-map FOO
 interface lo area 0
 interface eth0 area 0
 interface eth1 area 0
!
route-map FOO permit 10
!
line vty
!
end
r4-1.3# exit

vyos@r4-1.3# exit
Warning: configuration changes have not been saved.
exit
vyos@r4-1.3:~$ 
vyos@r4-1.3:~$ 
vyos@r4-1.3:~$ restart frr ospf6d 
WARNING: This is a potentially unsafe function! You may lose the connection to the router or active configuration after running this command. Use it at your own risk! Continue? [y/N]: y
vyos@r4-1.3:~$ vtysh

Hello, this is FRRouting (version 7.3.1-20210418-00-g9ab93ffc7).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

r4-1.3# sh run
Building configuration...

Current configuration:
!
frr version 7.3.1-20210418-00-g9ab93ffc7
frr defaults traditional
hostname r4-1.3
log syslog
log facility local7
service integrated-vtysh-config
!
router ospf6
 ospf6 router-id 1.2.3.4
 redistribute bgp route-map FOO
 interface lo area 0
 interface eth0 area 0
 interface eth1 area 0
!
route-map FOO permit 10
!
line vty
!
end
r4-1.3#

Where can I get the rc4? The last RR I see is vyos-1.3-rolling-202105011026-amd64.iso.

Not reproducible.
I close the task.
Reopen it if necessary. Describe step by step with an example of config how to reproduce it.
Thanks.