Page MenuHomeVyOS Platform

Removing full OSPF protocol is not possible
Closed, WontfixPublicBUG

Description

Reproduce

set

set policy prefix-list ROUTE-OSPF-STATIC rule 10 action 'permit'
set policy prefix-list ROUTE-OSPF-STATIC rule 10 prefix '172.16.222.0/28'
set policy route-map ROUTE-MAP-OSPF-STATIC rule 10 action 'permit'
set policy route-map ROUTE-MAP-OSPF-STATIC rule 10 match ip address prefix-list 'ROUTE-OSPF-STATIC'
set protocols ospf area 0 area-type normal
set protocols ospf area 0 network '172.16.253.128/29'
set protocols ospf area 0 network '172.16.254.100/32'
set protocols ospf area 0 network '172.16.252.68/30'
set protocols ospf area 0 network '172.16.252.64/30'
set protocols ospf log-adjacency-changes
set protocols ospf parameters abr-type 'cisco'
set protocols ospf parameters router-id '172.16.254.100'
set protocols ospf passive-interface 'default'
set protocols ospf passive-interface-exclude 'tun100'
set protocols ospf passive-interface-exclude 'wg02'
set protocols ospf passive-interface-exclude 'wg01'
set protocols ospf redistribute static metric-type '2'
set protocols ospf redistribute static route-map 'ROUTE-MAP-OSPF-STATIC'

show

vyos@vyos# show protocols ospf
 area 0 {
     area-type {
         normal
     }
     network 172.16.253.128/29
     network 172.16.254.100/32
     network 172.16.252.68/30
     network 172.16.252.64/30
 }
 log-adjacency-changes {
 }
 parameters {
     abr-type cisco
     router-id 172.16.254.100
 }
 passive-interface default
 passive-interface-exclude tun100
 passive-interface-exclude wg02
 passive-interface-exclude wg01
 redistribute {
     static {
         metric-type 2
         route-map ROUTE-MAP-OSPF-STATIC
     }
 }

error

vyos@vyos# delete protocols ospf
vyos@vyos# commit
[ protocols ospf area 0 network 172.16.253.128/29 ]
Can't find specified network area configuration.

delete [ protocols ospf ] failed
Commit failed
vyos@vyos# show protocols ospf
-area 0 {
-    area-type {
-        normal
-    }
-    network 172.16.253.128/29
-    network 172.16.254.100/32
-    network 172.16.252.68/30
-    network 172.16.252.64/30
-}
-log-adjacency-changes {
-}
-parameters {
-    abr-type cisco
-    router-id 172.16.254.100
-}
-passive-interface default
-passive-interface-exclude tun100
-passive-interface-exclude wg02
-passive-interface-exclude wg01
-redistribute {
-    static {
-        metric-type 2
-        route-map ROUTE-MAP-OSPF-STATIC
-    }
-}
[edit]

FRR

Expected

vyos@vyos# vtysh -c "show run"
router ospf
 ospf router-id 172.16.254.100
 log-adjacency-changes
 redistribute static route-map ROUTE-MAP-OSPF-STATIC
 passive-interface default
 no passive-interface tun100
 no passive-interface wg01
 no passive-interface wg02
 network 172.16.252.64/30 area 0
 network 172.16.252.68/30 area 0
 network 172.16.253.128/29 area 0
 network 172.16.254.100/32 area 0

Got

vyos@vyos# vtysh -c "show run"
router ospf
 ospf router-id 172.16.254.100
 redistribute static route-map ROUTE-MAP-OSPF-STATIC
 passive-interface default
 no passive-interface tun100
 no passive-interface wg01
 no passive-interface wg02

Details

Difficulty level
Normal (likely a few hours)
Version
1.2.2, 1.3
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

c-po triaged this task as High priority.Jul 11 2019, 9:17 AM
c-po created this task.
c-po updated the task description. (Show Details)
hagbard added a project: VyOS 1.3 Equuleus.
hagbard changed Version from 1.2.2 to 1.2.2, 1.3.
hagbard added a subscriber: hagbard.

@c-po
I get other result.
After set from your example I see correct area
FRR

router ospf
 ospf router-id 172.16.254.100
 log-adjacency-changes
 redistribute static route-map ROUTE-MAP-OSPF-STATIC
 passive-interface default
 no passive-interface eth1
 network 172.16.252.64/30 area 0
 network 172.16.252.68/30 area 0
 network 172.16.253.128/29 area 0
 network 172.16.254.100/32 area 0

Try delete OSPF (get error ref https://github.com/vyos/vyatta-cfg-quagga/blob/current/templates/protocols/ospf/passive-interface/node.def)

[email protected]# delete protocols ospf 
[edit]
[email protected]# commit
[ protocols ospf passive-interface default ]
Error: delete passive-interface-exclude before deleting passive-interface default

delete [ protocols ospf ] failed
Commit failed
[edit]

FRR shows that the network x.x.x.x area 0 is deleted.

router ospf
 ospf router-id 172.16.254.100
 redistribute static route-map ROUTE-MAP-OSPF-STATIC
 passive-interface default
 no passive-interface eth1

So, some configurations were deleted in FRR and if we try execute commit again, we get

[email protected]# commit
[ protocols ospf area 0 network 172.16.253.128/29 ]
Can't find specified network area configuration.

delete [ protocols ospf ] failed
Commit failed
[edit]
[email protected]#

Protocol rewrite is more then overdue now ... :)

Not quite sure if this is the right thing to do but, if a "delete protocols ospf" command is given the equivalent in FRR should be "no router ospf".

I am unsure if that's what the current command does. I take it it does not, as it seems to only remove the networks and not remove anything else.

Edit:

I re-edited my post. I was wrong initially :(

dmbaturin set Is it a breaking change? to Unspecified (possibly destroys the router).
syncer added a subscriber: syncer.

limitations of old backend
may come back to this later after new backend live