Uploaded image for project: 'Fast Datapath Product'
  1. Fast Datapath Product
  2. FDP-1715

vrf is deleted even when dynamic-routing-maintain-vrf is false for lrp

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Normal Normal
    • None
    • None
    • ovn25.03
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      Given a logical router with `dynamic-routing-maintain-vrf=true`,

      When dynamic routing is toggled and gateway chassis changes occur,

      Then the associated VRF interface MUST NOT be deleted on the Linux host.

      Show
      Given a logical router with `dynamic-routing-maintain-vrf=true`, When dynamic routing is toggled and gateway chassis changes occur, Then the associated VRF interface MUST NOT be deleted on the Linux host.
    • rhel-9
    • None
    • rhel-net-ovn
    • ssg_networking

       Problem Description: Clearly explain the issue.

      vrf is deleted even when dynamic-routing-maintain-vrf is false for lrp

       Impact Assessment: Describe the severity and impact (e.g., network down,availability of a workaround, etc.).

       

       Software Versions: Specify the exact versions in use (e.g.,openvswitch3.1-3.1.0-147.el8fdp).

      ovn25.03-25.03.1-60.el9fdp.x86_64

        Issue Type: Indicate whether this is a new issue or a regression (if a regression, state the last known working version).

      new issue

       Reproducibility: Confirm if the issue can be reproduced consistently. If not, describe how often it occurs.

      Always

       Reproduction Steps: Provide detailed steps or scripts to replicate the issue.

      1 server

      ip link del vrf11
      ip link add vrf11 type vrf table 11
      ip link set vrf11 up
      ip link add veth_vrf type veth peer name veth_vrf_p
      ip link set veth_vrf master vrf11
      ip link set veth_vrf up
      ip addr add 172.17.86.110/24 dev veth_vrf
      ip addr add 172:17:86::110/24 dev veth_vrf
      ip link set veth_vrf_p upsystemctl start openvswitch
      systemctl start ovn-northd 
      ovn-nbctl set-connection ptcp:6641                                       
      ovn-sbctl set-connection ptcp:6642
      ovs-vsctl set open . external_ids:system-id=hv1 external_ids:ovn-remote=tcp:20.0.86.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.86.25
      systemctl restart ovn-controllerovs-vsctl add-br br-nat
      ovs-vsctl set open . external_ids:ovn-bridge-mappings=phy:br-nat
      ip link set br-nat up
      ovs-vsctl add-port br-nat ens1f1np1
      ovs-vsctl set open . external_ids:ovn-bridge-mappings=phy:br-nat
      ovn-nbctl lr-add lr-tenant          \
          -- lrp-add lr-tenant lr-tenant-public 00:00:00:00:00:42 20.0.0.42/8 2002::42/64         \
          -- ls-add ls-tenant             \
          -- lrp-add lr-tenant lr-tenant-ls 00:00:00:00:01:0a 192.168.1.254/24 1101::254/64               \
          -- lsp-add ls-tenant ls-tenant-lr               \
          -- set logical_switch_port ls-tenant-lr                 \
          type=router options:router-port=lr-tenant-ls            \
          -- lsp-set-addresses ls-tenant-lr router                \
          -- lr-route-add lr-tenant 0.0.0.0/0 20.0.0.2 lr-tenant-public
      ovn-nbctl ls-add public             \
          -- lr-add lr-bgp
      ovn-nbctl           \
          -- lrp-add lr-bgp lr-bgp-pub 00:00:00:00:00:03 20.0.0.2/8 2002::2/64            \
          -- lsp-add public pub-lr-bgp            \
          -- set logical_switch_port pub-lr-bgp type=router               \
          options:router-port=lr-bgp-pub          \
          -- lsp-set-addresses pub-lr-bgp router          \
          -- lsp-add public pub-lr-tenant                 \
          -- set logical_switch_port pub-lr-tenant type=router            \
          options:router-port=lr-tenant-public            \
          -- lsp-add public pub-ln                \
          -- lsp-set-type pub-ln localnet                 \
          -- lsp-set-addresses pub-ln unknown             \
          -- lsp-set-options pub-ln network_name=phy
      ovn-nbctl lsp-add ls-tenant ls1p1           \
          -- lsp-set-addresses ls1p1 "00:00:00:00:01:01 192.168.1.1 1101::1"              \
          -- lsp-add ls-tenant ls1p2              \
          -- lsp-set-addresses ls1p2 "00:00:00:00:01:02 192.168.1.2 1101::2"
      ovn-nbctl lr-add lr2                \
          -- lrp-add lr2 lr2-pub 00:00:00:00:00:52 20.2.0.52/8 2202::52/64                \
          -- ls-add ls2           \
          -- lrp-add lr2 lr2-ls2 00:00:00:00:02:0a 192.168.2.254/24 1102::254/64          \
          -- lsp-add ls2 ls2-lr2          \
          -- set logical_switch_port ls2-lr2 type=router          options:router-port=lr2-ls2             \
          -- lsp-set-addresses ls2-lr2 router
      ovn-nbctl ls-add public2            \
          -- lsp-add public2 pub2-lr2             \
          -- set logical_switch_port pub2-lr2 type=router                 \
          options:router-port=lr2-pub             \
          -- lrp-add lr-bgp lr-bgp-pub2 00:00:00:ff:00:02                 \
          -- lsp-add public2 pub2-bgp             \
          -- set logical_switch_port pub2-bgp type=router                 \
          options:router-port=lr-bgp-pub2
      ovn-nbctl lsp-add ls2 ls2p1                 \
          -- lsp-set-addresses ls2p1 "00:00:00:00:02:01 192.168.2.1 1102::1"              \
          -- lsp-add ls2 ls2p2            \
          -- lsp-set-addresses ls2p2 "00:00:00:00:02:02 192.168.2.2 1102::2"
      ovn-nbctl lrp-set-gateway-chassis lr-bgp-pub hv1            \
          -- lrp-set-gateway-chassis lr-bgp-pub2 hv0
      ovn-nbctl set logical_router lr-bgp options:dynamic-routing-vrf-name=vrf11          \
          -- set logical_router_port lr-bgp-pub2 options:dynamic-routing-maintain-vrf=true 

      2. setup on client

      systemctl start openvswitch
      ovs-vsctl set open . external_ids:system-id=hv0 external_ids:ovn-remote=tcp:20.0.86.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.86.26
      systemctl restart ovn-controllerovs-vsctl add-br br-nat
      ovs-vsctl set open . external_ids:ovn-bridge-mappings=phy:br-nat
      ip link set br-nat up
      ovs-vsctl add-port br-nat ens1f1np1 

      3. run test on server

      ovn-nbctl set logical_router lr-bgp options:dynamic-routing=true \
          options:requested-tnl-key=11
      ovn-nbctl --wait=sb set logical_router lr-bgp options:dynamic-routing-redistribute=connected,connected-as-host,static,lb,natsleep 1
      ip route list vrf vrf11
      ovn-nbctl lrp-del-gateway-chassis lr-bgp-pub hv1
      ovn-nbctl lrp-del-gateway-chassis lr-bgp-pub2 hv0
      ovn-nbctl --wait=sb sync
      sleep 1
      ip route list vrf vrf11
      ovn-nbctl set logical_router lr-bgp options:chassis=hv1
      ovn-nbctl --wait=sb sync
      sleep 1
      ip route list vrf vrf11
      ovn-nbctl remove logical_router lr-bgp options chassis
      ovn-nbctl --wait=sb sync
      sleep 1
      ip route list vrf vrf11
      ovn-nbctl lrp-set-gateway-chassis lr-bgp-pub hv1
      ovn-nbctl lrp-set-gateway-chassis lr-bgp-pub2 hv0
      ovn-nbctl --wait=sb sync
      sleep 1
      ip route list vrf vrf11
      ovn-nbctl --wait=sb set logical_router lr-bgp options:dynamic-routing=false
      sleep 1
      ip route list vrf vrf11 

       Expected Behavior: Describe what should happen under normal circumstances.

      vrf11 is not deleted on server

       Observed Behavior: Explain what actually happens.

      vrf11 is deleted on server

       Troubleshooting Actions: Outline the steps taken to diagnose or resolve the issue so far.

       

       Logs: If you collected logs please provide them (e.g. sos report, /var/log/openvswitch/* , testpmd console)

       

      [root@wsfd-advnetlab18 test]# rpm -qa | grep -E "openvswitch|ovn"
      openvswitch-selinux-extra-policy-1.0-39.el9fdp.noarch
      openvswitch3.5-3.5.2-50.el9fdp.x86_64
      ovn25.03-25.03.1-60.el9fdp.x86_64
      ovn25.03-central-25.03.1-60.el9fdp.x86_64
      ovn25.03-host-25.03.1-60.el9fdp.x86_64
      python3-openvswitch3.5-3.5.2-50.el9fdp.x86_64
      
      [root@wsfd-advnetlab18 test]# bash -x test.sh                                                         
      + ovn-nbctl set logical_router lr-bgp options:dynamic-routing=true options:requested-tnl-key=11       
      + ovn-nbctl --wait=sb set logical_router lr-bgp options:dynamic-routing-redistribute=connected,connected-as-host,static,lb,nat
      + sleep 1
      + ip route list vrf vrf11                                                                             
      blackhole 20.0.0.2 proto 84 metric 100 
      blackhole 20.0.0.42 proto 84 metric 1000 
      blackhole 20.2.0.52 proto 84 metric 1000                                                              
      172.17.86.0/24 dev veth_vrf proto kernel scope link src 172.17.86.110                                 
      + ovn-nbctl lrp-del-gateway-chassis lr-bgp-pub hv1                                                    
      + ovn-nbctl lrp-del-gateway-chassis lr-bgp-pub2 hv0                                                   
      + ovn-nbctl --wait=sb sync                                                                            
      + sleep 1
      + ip route list vrf vrf11                                                                             
      172.17.86.0/24 dev veth_vrf proto kernel scope link src 172.17.86.110                                 
      + ovn-nbctl set logical_router lr-bgp options:chassis=hv1                                             
      + ovn-nbctl --wait=sb sync                                                                            
      + sleep 1
      + ip route list vrf vrf11                                                                             
      blackhole 20.0.0.2 proto 84 metric 100 
      blackhole 20.0.0.42 proto 84 metric 1000 
      blackhole 20.2.0.52 proto 84 metric 1000 
      172.17.86.0/24 dev veth_vrf proto kernel scope link src 172.17.86.110                                 
      + ovn-nbctl remove logical_router lr-bgp options chassis                                              
      + ovn-nbctl --wait=sb sync
      + sleep 1
      + ip route list vrf vrf11
      Error: argument "vrf11" is wrong: Invalid VRF                                                         + ovn-nbctl lrp-set-gateway-chassis lr-bgp-pub hv1
      + ovn-nbctl lrp-set-gateway-chassis lr-bgp-pub2 hv0
      + ovn-nbctl --wait=sb sync
      + sleep 1                                                                                             
      + ip route list vrf vrf11                                                                             
      Error: argument "vrf11" is wrong: Invalid VRF                                                         
                                                                                                            
      + ovn-nbctl --wait=sb set logical_router lr-bgp options:dynamic-routing=false                         
      + sleep 1                                                                                             
      + ip route list vrf vrf11                                                                             
      Error: argument "vrf11" is wrong: Invalid VRF
      
      <=== vrf11 is deleted 

              ovnteam@redhat.com OVN Team
              rhn-support-jishi Jianlin Shi
              Jianlin Shi Jianlin Shi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: