Page MenuHomeVyOS Platform

Removing full OSPF protocol is not possible
Open, HighPublicBUG

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

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)Jul 11 2019, 9:19 AM
c-po updated the task description. (Show Details)
hagbard claimed this task.Jul 12 2019, 8:02 PM
hagbard added a project: VyOS 1.3 Equuleus.
hagbard changed Version from 1.2.2 to 1.2.2, 1.3.

Same issue present in 1.3

hagbard removed hagbard as the assignee of this task.Jul 15 2019, 2:28 PM
hagbard added a subscriber: hagbard.
pasik added a subscriber: pasik.Jul 16 2019, 9:49 AM
syncer assigned this task to zsdc.Aug 30 2019, 11:45 PM
syncer removed a project: VyOS 1.2 Crux.

@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)

vyos@1.2-roll-ns# delete protocols ospf 
[edit]
vyos@1.2-roll-ns# 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

vyos@1.2-roll-ns# 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]
vyos@1.2-roll-ns#
c-po added a comment.Dec 13 2019, 5:55 PM

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

zakwan added a subscriber: zakwan.Jun 10 2020, 10:50 AM