Bug 1937662 - ping over localport after destroy port_binding for localport
Summary: ping over localport after destroy port_binding for localport
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.13
Version: FDP 21.B
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: lorenzo bianconi
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-11 09:45 UTC by Jianlin Shi
Modified: 2021-06-02 09:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Jianlin Shi 2021-03-11 09:45:38 UTC
Description of problem:
ping over localport after destroy port_binding for localport

Version-Release number of selected component (if applicable):
ovn2.13-20.12.0-24

How reproducible:
Always

Steps to Reproduce:
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.174.26:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.174.26
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:01 192.168.1.1 2001::1"
ovn-nbctl lsp-add ls1 ls1p2 
ovn-nbctl lsp-set-addresses ls1p2 "00:00:00:01:01:02 192.168.1.2 2001::2"
ovn-nbctl lsp-add ls1 lp                                       
ovn-nbctl lsp-set-type lp localport     
ovn-nbctl lsp-set-addresses lp "00:00:00:01:01:11 192.168.1.11 2001::11"
                                                    
ovn-nbctl lr-add lr1                                                
ovn-nbctl lrp-add lr1 lr1-ls1 00:00:00:00:00:01 192.168.1.254/24 2001::a/64
ovn-nbctl lsp-add ls1 ls1-lr1
ovn-nbctl lsp-set-addresses ls1-lr1 "00:00:00:00:00:01 192.168.1.254 2001::a"
ovn-nbctl lsp-set-type ls1-lr1 router
ovn-nbctl lsp-set-options ls1-lr1 router-port=lr1-ls1    
                                  
ovn-nbctl lrp-add lr1 lr1-ls2 00:00:00:00:00:02 192.168.2.254/24 2002::a/64
                                               
ovn-nbctl ls-add ls2                                          
ovn-nbctl lsp-add ls2 ls2-lr1                              
ovn-nbctl lsp-set-addresses ls2-lr1 "00:00:00:00:00:02 192.168.2.254 2002::a"
ovn-nbctl lsp-set-type ls2-lr1 router
ovn-nbctl lsp-set-options ls2-lr1 router-port=lr1-ls2
                                                               
ovn-nbctl lsp-add ls2 ls2p1             
ovn-nbctl lsp-set-addresses ls2p1 "00:00:00:01:02:01 192.168.2.1 2002::1"
ovn-nbctl lsp-add ls2 ls2p2                         
ovn-nbctl lsp-set-addresses ls2p2 "00:00:00:01:02:02 192.168.2.2 2002::2"
                                                                 
ovs-vsctl add-port br-int ls1p1 -- set interface ls1p1 type=internal external_ids:iface-id=ls1p1
ovs-vsctl add-port br-int lp -- set interface lp type=internal external_ids:iface-id=lp
ovs-vsctl add-port br-int ls2p1 -- set interface ls2p1 type=internal external_ids:iface-id=ls2p1
                                                                                
ip netns add ls1p1                     
ip link set ls1p1 netns ls1p1              
ip netns exec ls1p1 ip link set ls1p1 address 00:00:00:01:01:01
ip netns exec ls1p1 ip link set ls1p1 up
ip netns exec ls1p1 ip addr add 192.168.1.1/24 dev ls1p1
ip netns exec ls1p1 ip addr add 2001::1/64 dev ls1p1
ip netns exec ls1p1 ip route add default via 192.168.1.254 dev ls1p1
ip netns exec ls1p1 ip -6 route add default via 2001::a dev ls1p1

ip netns add lp
ip link set lp netns lp
ip netns exec lp ip link set lp address 00:00:00:01:01:11
ip netns exec lp ip link set lp up
ip netns exec lp ip addr add 192.168.1.11/24 dev lp
ip netns exec lp ip addr add 2001::11/64 dev lp
ip netns exec lp ip route add default via 192.168.1.254 dev lp
ip netns exec lp ip -6 route add default via 2001::a dev lp 

ip netns add ls2p1
ip link set ls2p1 netns ls2p1
ip netns exec ls2p1 ip link set ls2p1 address 00:00:00:01:02:01
ip netns exec ls2p1 ip link set ls2p1 up
ip netns exec ls2p1 ip addr add 192.168.2.1/24 dev ls2p1
ip netns exec ls2p1 ip addr add 2002::1/64 dev ls2p1
ip netns exec ls2p1 ip route add default via 192.168.2.254 dev ls2p1
ip netns exec ls2p1 ip -6 route add default via 2002::a dev ls2p1

ip netns exec lp ping 192.168.1.1 -c 1
ovn-sbctl find port_binding logical_port=lp
lp_uuid=$(ovn-sbctl find port_binding logical_port=lp | awk '/_uuid/{print $3}')
ovn-sbctl destroy port_binding $lp_uuid
ovn-sbctl find port_binding logical_port=lp
ip netns exec lp ping 192.168.1.1 -c 1

Actual results:
+ ip netns exec lp ping 192.168.1.1 -c 1                                                                                                                                                                    
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.                                                                                                                                                        
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1001 ms                                                                                                                                                   
                                                                                                                                                                                                            
--- 192.168.1.1 ping statistics ---                                                                                                                                                                         
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                                                                                                                                 
rtt min/avg/max/mdev = 1001.860/1001.860/1001.860/0.000 ms                                                                                                                                                  
+ ovn-sbctl find port_binding logical_port=lp                                                                                                                                                               
_uuid               : e08880f1-39c9-43b2-90a8-2d3278d99454                                                                                                                                                  
chassis             : []                                                                                                                                                                                    
datapath            : 932f2e63-0d06-4afb-9523-59b4cecb0685                                                                                                                                                  
encap               : []                                                                                                                                                                                    
external_ids        : {}                                                                                                                                                                                    
gateway_chassis     : []                                                                                                                                                                                    
ha_chassis_group    : []       
logical_port        : lp                                                   
mac                 : ["00:00:00:01:01:11 192.168.1.11 2001::11"]
nat_addresses       : []                                                     
options             : {}                            
parent_port         : []                             
tag                 : []           
tunnel_key          : 3                                                    
type                : localport
up                  : false                              
virtual_parent      : []                
++ ovn-sbctl find port_binding logical_port=lp                               
++ awk '/_uuid/{print $3}'           
+ lp_uuid=e08880f1-39c9-43b2-90a8-2d3278d99454       
+ ovn-sbctl destroy port_binding e08880f1-39c9-43b2-90a8-2d3278d99454
+ ovn-sbctl find port_binding logical_port=lp
_uuid               : 61351186-ceee-457a-8d5b-19c5cfee6621               
chassis             : []          
datapath            : 932f2e63-0d06-4afb-9523-59b4cecb0685                                                                                                           
encap               : []        
external_ids        : {}                                                                        
gateway_chassis     : []                                                               
ha_chassis_group    : []                                                                        
logical_port        : lp                                                 
mac                 : ["00:00:00:01:01:11 192.168.1.11 2001::11"]
nat_addresses       : []                                                 
options             : {}                                       
parent_port         : []                
tag                 : []                                                
tunnel_key          : 5                             
type                : localport                                     
up                  : false                                                
virtual_parent      : []     
+ ip netns exec lp ping 192.168.1.1 -c 1                                     
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
                                                         
--- 192.168.1.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms

Expected results:
ping should pass

Additional info:


Note You need to log in before you can comment on or make changes to this bug.