Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.

Bug 1870444

Summary: fail to ping in ls-lr-ls topo after set requested-tnl-key for logical switch
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Jianlin Shi <jishi>
Component: ovn2.13Assignee: OVN Team <ovnteam>
Status: CLOSED WONTFIX QA Contact: Ehsan Elahi <eelahi>
Severity: medium Docs Contact:
Priority: medium    
Version: FDP 20.ECC: ctrautma, eelahi, jishi, pizhang, ralongi, zfang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-14 21:11:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jianlin Shi 2020-08-20 06:26:26 UTC
Description of problem:
fail to ping in ls-lr-ls topo after set requested-tnl-key for logical switch

Version-Release number of selected component (if applicable):
ovn2.13-20.06.1-6.el8fdp.x86_64

How reproducible:
Always

Steps to Reproduce:
server:
#!/bin/bash

systemctl 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.31.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.31.25
systemctl restart ovn-controller

ovn-nbctl ls-add ls1
ovn-nbctl lsp-add ls1 ls1p1
ovn-nbctl lsp-set-addresses ls1p1 "00:00:00:01:01:02 192.168.1.1"
ovn-nbctl ls-add ls2
ovn-nbctl lsp-add ls2 ls2p1
ovn-nbctl lsp-set-addresses ls2p1 "00:00:00:01:02:02 192.168.2.1"

ovn-nbctl lr-add lr1
ovn-nbctl lrp-add lr1 lr1-ls1 00:de:ad:ff:01:01 192.168.1.254/24
ovn-nbctl lrp-add lr1 lr1-ls2 00:de:ad:ff:01:02 192.168.2.254/24

ovn-nbctl lsp-add ls1 ls1-lr1
ovn-nbctl lsp-set-type ls1-lr1 router
ovn-nbctl lsp-set-addresses ls1-lr1 00:de:ad:ff:01:01
ovn-nbctl lsp-set-options ls1-lr1 router-port=lr1-ls1

ovn-nbctl lsp-add ls2 ls2-lr1
ovn-nbctl lsp-set-type ls2-lr1 router
ovn-nbctl lsp-set-addresses ls2-lr1 00:de:ad:ff:01:02
ovn-nbctl lsp-set-options ls2-lr1 router-port=lr1-ls2

ovs-vsctl add-port br-int p1 -- set interface p1 type=internal
ip netns add p1
ip link set p1 netns p1
ip netns exec p1 ip link set p1 address 00:00:00:01:01:02
ip netns exec p1 ip link set p1 up
ip netns exec p1 ip addr add 192.168.1.1/24 dev p1
ip netns exec p1 ip route add default via 192.168.1.254 dev p1
ovs-vsctl set interface p1 external_ids:iface-id=ls1p1

client:
#!/bin/bash

systemctl start openvswitch                                                                           
ovs-vsctl set open . external_ids:system-id=hv0 external_ids:ovn-remote=tcp:20.0.31.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.31.26
systemctl restart ovn-controller

ovs-vsctl add-port br-int p2 -- set interface p2 type=internal
ip netns add p2
ip link set p2 netns p2
ip netns exec p2 ip link set p2 address 00:00:00:01:02:02
ip netns exec p2 ip link set p2 up
ip netns exec p2 ip addr add 192.168.2.1/24 dev p2
ip netns exec p2 ip route add default via 192.168.2.254 dev p2
ovs-vsctl set interface p2 external_ids:iface-id=ls2p1

# server
[root@dell-per740-12 test]# ovn-nbctl set logical_switch ls1 other_config:requested-tnl-key=16777215
[root@dell-per740-12 test]# ovn-nbctl --wait=hv sync

[root@dell-per740-12 test]# ip netns exec p1 ping 192.168.2.1 -c 1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.                                                  

--- 192.168.2.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
<== failed

Actual results:
ping failed

Expected results:
ping should pass

Additional info:


if recompute for ovn-controller with "ovn-appctl -t ovn-controller recompute" on both side, ping would pass

[root@dell-per740-12 test]# rpm -qa | grep -E "openvswitch|ovn"                                       
ovn2.13-20.06.1-6.el8fdp.x86_64
ovn2.13-central-20.06.1-6.el8fdp.x86_64                                                               
openvswitch2.13-2.13.0-54.el8fdp.x86_64                                                               
ovn2.13-host-20.06.1-6.el8fdp.x86_64
kernel-kernel-networking-openvswitch-ovn-common-1.0-7.noarch                                          
python3-openvswitch2.13-2.13.0-54.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch

Comment 2 Ehsan Elahi 2022-03-21 11:40:51 UTC
In ovn2.13-host-20.12.0-195.el8fdp.x86_64, ping works after set the requested-tnl-key for ls. However in ovn-2021-21.12.0-30.el8fdp.x86_64, the requested-tnl-key is also set for the first time but if the tnl-key value is selected which was previously used, then it fails to ping until ovn-controller recompute.

for normal_val in 1 12345 16777215 1
do
	ovn-nbctl set logical_switch ls1 other_config:requested-tnl-key=$normal_val
	ovn-nbctl --wait=hv sync
	ovn-sbctl find datapath_binding external_ids:name=ls1 | grep tunnel_key | grep $normal_val
	ip netns exec p1 ping 192.168.2.1 -c 1
done 

In the last iteration of the loop, the ping failed because 1 was already used previously as requested-tnl-key.

Comment 3 OVN Bot 2024-02-14 21:11:13 UTC
This issue is being closed as an automatic process due to the issue's age. If you wish to re-open this issue, please do so in Jira (https://issues.redhat.com) in the 'FDP' project. Please be sure to set the component to the latest OVN version where this issue is known to occur. If this is a feature request or improvement, please set the component to 'OVN'.