The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 2037433 - SB DB up field at Port_Binding table not set back to False
Summary: SB DB up field at Port_Binding table not set back to False
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn-2021
Version: FDP 21.K
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
: ---
Assignee: Mohammad Heib
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-05 16:08 UTC by Luis Tomas Bolivar
Modified: 2022-06-30 18:00 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-06-30 17:59:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-1700 0 None None None 2022-01-05 16:13:50 UTC
Red Hat Product Errata RHBA-2022:5446 0 None None None 2022-06-30 18:00:24 UTC

Description Luis Tomas Bolivar 2022-01-05 16:08:29 UTC
The ports at Port_Binding table that have a parent port associated are not getting their Up field properly updated. When the port gets associated to a parent (and therefore gets a chassis) it properly transitions the Up field from False to True. However when the port gets its parent port removed (and therefore gets its chassis removed too), the Up field remains True, while it should be transitioned back to False.

Comment 8 Jianlin Shi 2022-06-09 07:00:17 UTC
tested with following script:

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.182.26:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.182.26
systemctl restart ovn-controller                                                                      
                                                                                                      
ovn-nbctl ls-add ls1                                                                                  
ovn-nbctl lsp-add ls1 ls1p1                                                                           
ovn-nbctl lsp-add ls1 ls1p1.11 ls1p1 11                                                               
ovn-nbctl lsp-set-addresses ls1p1.11 "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"                              
                                                                                                      
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               
                                                                                                      
ip netns add ls1p1                                                                                    
ip link add link ls1p1 name ls1p1.11 type vlan id 11                                                  
ip link set ls1p1.11 netns ls1p1                                                                      
ip link set ls1p1 up                                                                                  
ip netns exec ls1p1 ip link set ls1p1.11 address 00:00:00:01:01:01                                    
ip netns exec ls1p1 ip link set ls1p1.11 up                                                           
ip netns exec ls1p1 ip addr add 192.168.1.1/24 dev ls1p1.11                                           
ip netns exec ls1p1 ip addr add 2001::1/64 dev ls1p1.11                                               
ip netns exec ls1p1 ip route add default via 192.168.1.254 dev ls1p1.11                               
ip netns exec ls1p1 ip -6 route add default via 2001::a dev ls1p1.11                                  
                                                                                                      
ovs-vsctl add-port br-int ls1p2 -- set interface ls1p2 type=internal external_ids:iface-id=ls1p2      
ip netns add ls1p2                                                                                    
ip link set ls1p2 netns ls1p2                                                                         
ip netns exec ls1p2 ip link set ls1p2 address 00:00:00:01:01:02                                       
ip netns exec ls1p2 ip link set ls1p2 up                                                              
ip netns exec ls1p2 ip addr add 192.168.1.2/24 dev ls1p2                                              
ip netns exec ls1p2 ip addr add 2001::2/64 dev ls1p2                                                  
ip netns exec ls1p2 ip route add default via 192.168.1.254 dev ls1p2                                  
ip netns exec ls1p2 ip -6 route add default via 2001::a                                               
                                                                                                      
ovn-nbctl --wait=hv sync                                                                              
ip netns exec ls1p1 ping 192.168.1.2 -c 1                                                             
ovn-sbctl list port_binding ls1p1.11                                                                  
ovn-nbctl clear logical_switch_port ls1p1.11 parent_name                                              
ovn-nbctl --wait=sb sync                                                                              
ovn-sbctl list port_binding ls1p1.11 

reproduced with ovn-2021-21.12.0-30.el8:

+ ip netns exec ls1p1 ping 192.168.1.2 -c 1                                                           
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.                                                  
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.45 ms                                             
                                                                                                                                                                                                            
--- 192.168.1.2 ping statistics ---                                                                   
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                                                                                                                                 
rtt min/avg/max/mdev = 1.448/1.448/1.448/0.000 ms                                                                                                                                                           
+ ovn-sbctl list port_binding ls1p1.11                                                                
_uuid               : b65700ea-18fc-4cae-933e-0b33d7808e9c                                                                                                                                                  
chassis             : 83562f70-600a-42c4-9717-a523fa93a1bc                                            
datapath            : 3b33c1bd-6b73-4738-8a95-483808527f6c                                            
encap               : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                                                                                                                                    
logical_port        : ls1p1.11                                                                                                                                                                              
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                                                                                                                                                                                    
options             : {}                                                                                                                                                                                    
parent_port         : ls1p1                                                                           
requested_chassis   : []                                                                                                                                                                                    
tag                 : 11                                                                              
tunnel_key          : 2                                                                               
type                : ""                                                                                                                                                                                    
up                  : true                                                                                                                                                                                  
virtual_parent      : []                                                                              
+ ovn-nbctl clear logical_switch_port ls1p1.11 parent_name                                                                                                                                                  
+ ovn-nbctl --wait=sb sync                                                                                                                                                                                  
+ ovn-sbctl list port_binding ls1p1.11                                                                
_uuid               : b65700ea-18fc-4cae-933e-0b33d7808e9c                                            
chassis             : []                                                                              
datapath            : 3b33c1bd-6b73-4738-8a95-483808527f6c                                            
encap               : []                                                                              
external_ids        : {}                                                                                                                                                                                    
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                                                                                                                                    
logical_port        : ls1p1.11                                                                                                                                                                              
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                                                                                                                                                                                    
options             : {}                                                                              
parent_port         : []                                                                              
requested_chassis   : []                                                                              
tag                 : 11                                                                              
tunnel_key          : 2                                                                               
type                : ""                                                                                                                                                                                    
up                  : true                                                                                                                                                                                  
virtual_parent      : [] 

<=== up is still true after parent_name is cleared

Verified with ovn-2021-21.12.0-73.el8:

+ ip netns exec ls1p1 ping 192.168.1.2 -c 1        
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.                                                  
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.34 ms                                             
                                                   
--- 192.168.1.2 ping statistics ---                
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                           
rtt min/avg/max/mdev = 1.343/1.343/1.343/0.000 ms  
+ ovn-sbctl list port_binding ls1p1.11                                                                
_uuid               : 4e34ec9a-9fd4-4772-b2e0-085cc3f14620                                            
chassis             : 7c1a758d-20b9-4df8-827a-05977d7bdd8a                                            
datapath            : e1bce5bf-6980-4afd-8504-8023ad4b9421                                            
encap               : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
logical_port        : ls1p1.11                     
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                                                                              
options             : {}                           
parent_port         : ls1p1                                                                           
requested_chassis   : []                           
tag                 : 11                                                                              
tunnel_key          : 2                                                                               
type                : ""                                                                              
up                  : true                                                                            
virtual_parent      : []                           
+ ovn-nbctl clear logical_switch_port ls1p1.11 parent_name                                            
+ ovn-nbctl --wait=sb sync                                                                            
+ ovn-sbctl list port_binding ls1p1.11             
_uuid               : 7daa1d72-fbd6-45b5-b7ff-5e3c20582d7a                                                                                                                                                  
chassis             : []                           
datapath            : e1bce5bf-6980-4afd-8504-8023ad4b9421                                            
encap               : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
logical_port        : ls1p1.11                     
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                                                                              
options             : {}                                                                              
parent_port         : []                                                                              
requested_chassis   : []                                                                              
tag                 : 11                                                                              
tunnel_key          : 5                            
type                : ""                           
up                  : false                        
virtual_parent      : []     

<=== up is false
                      
[root@wsfd-advnetlab17 bz2037433]# rpm -qa | grep -E "openvswitch2.15|ovn-2021"                       
openvswitch2.15-2.15.0-104.el8fdp.x86_64           
python3-openvswitch2.15-2.15.0-104.el8fdp.x86_64   
ovn-2021-21.12.0-73.el8fdp.x86_64                  
ovn-2021-central-21.12.0-73.el8fdp.x86_64          
ovn-2021-host-21.12.0-73.el8fdp.x86_64

Comment 9 Jianlin Shi 2022-06-09 07:02:50 UTC
also verified with ovn22.03-22.03.0-52.el8:

+ ip netns exec ls1p1 ping 192.168.1.2 -c 1        
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.                                                  
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.23 ms                                             
                                                   
--- 192.168.1.2 ping statistics ---                
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                           
rtt min/avg/max/mdev = 1.234/1.234/1.234/0.000 ms  
+ ovn-sbctl list port_binding ls1p1.11                                                                
_uuid               : f5bd3068-38e9-4995-a0ed-075630aa551e                                            
chassis             : 67964089-20de-4a9e-bee8-aa5685219dd5                                            
datapath            : 90850737-5f5f-47c3-a561-5c9fabd8eb36                                            
encap               : []                           
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
logical_port        : ls1p1.11                                                                        
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                           
options             : {}                                                                              
parent_port         : ls1p1                        
requested_chassis   : []                                                                              
tag                 : 11                                                                              
tunnel_key          : 2                            
type                : ""                                                                              
up                  : true                         
virtual_parent      : []                                                                              
+ ovn-nbctl clear logical_switch_port ls1p1.11 parent_name                                            
+ ovn-nbctl --wait=sb sync                                                                            
+ ovn-sbctl list port_binding ls1p1.11             
_uuid               : 911b3bfa-5b61-4176-bdb0-42b9e9f76e78                                            
chassis             : []                           
datapath            : 90850737-5f5f-47c3-a561-5c9fabd8eb36                                            
encap               : []                           
external_ids        : {}                                                                              
gateway_chassis     : []                           
ha_chassis_group    : []                                                                              
logical_port        : ls1p1.11                                                                        
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                           
options             : {}                                                                              
parent_port         : []                                                                              
requested_chassis   : []                                                                              
tag                 : 11                                                                              
tunnel_key          : 5                                                                               
type                : ""                                                                              
up                  : false                                                                           
virtual_parent      : []                           
+ ip netns exec ls1p1 ping 192.168.1.2 -c 1                                                           
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.                                                  
                                                   
--- 192.168.1.2 ping statistics ---                                                                   
1 packets transmitted, 0 received, 100% packet loss, time 0ms

+ ovn-nbctl --wait=sb set logical_switch_port ls1p1.11 parent_name=ls1p1                             
+ ovn-sbctl list port_binding ls1p1.11
_uuid               : 44351c01-e8b8-466e-93f0-2faed0e3e378
chassis             : 67964089-20de-4a9e-bee8-aa5685219dd5
datapath            : 90850737-5f5f-47c3-a561-5c9fabd8eb36
encap               : [] 
external_ids        : {}
gateway_chassis     : []
ha_chassis_group    : []
logical_port        : ls1p1.11
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]
nat_addresses       : []
options             : {}
parent_port         : ls1p1
requested_chassis   : []
tag                 : 11
tunnel_key          : 5
type                : ""
up                  : true
virtual_parent      : []
+ ip netns exec ls1p1 ping 192.168.1.2 -c 1
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.649 ms

--- 192.168.1.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.649/0.649/0.649/0.000 ms
[root@wsfd-advnetlab17 bz2037433]# rpm -qa | grep -E "openvswith2.15|ovn22.03"
ovn22.03-22.03.0-52.el8fdp.x86_64
ovn22.03-central-22.03.0-52.el8fdp.x86_64         
ovn22.03-host-22.03.0-52.el8fdp.x86_64

Comment 10 Jianlin Shi 2022-06-10 05:16:24 UTC
also verified on ovn22.03-22.03.0-52.el9:

[root@wsfd-advnetlab16 bz2037433]# rpm -qa | grep -E "openvswitch|ovn"                                
ovn22.03-22.03.0-52.el9fdp.x86_64                                                                     
openvswitch-selinux-extra-policy-1.0-31.el9fdp.noarch                                                 
openvswitch2.17-2.17.0-22.el9fdp.x86_64                                                               
ovn22.03-central-22.03.0-52.el9fdp.x86_64                                                             
ovn22.03-host-22.03.0-52.el9fdp.x86_64

+ ovn-nbctl --wait=hv sync                                                                            
+ ip netns exec ls1p1 ping 192.168.1.2 -c 1                                                           
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.                                                  
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=1.28 ms                                             
                                                                                                      
--- 192.168.1.2 ping statistics ---                                                                   
1 packets transmitted, 1 received, 0% packet loss, time 0ms                                           
rtt min/avg/max/mdev = 1.276/1.276/1.276/0.000 ms                                                     
+ ovn-sbctl list port_binding ls1p1.11                                                                
_uuid               : b7e5374e-97c2-4985-8045-320390feec81                                            
chassis             : 4b576a30-01ef-453d-92ac-0ccaf31af3ca                                            
datapath            : 1ab6f119-6b73-4c0a-b817-cc7e4ed5b9b2                                            
encap               : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
logical_port        : ls1p1.11                                                                        
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                                                                              
options             : {}                                                                              
parent_port         : ls1p1                                                                           
requested_chassis   : []                                                                              
tag                 : 11                                                                              
tunnel_key          : 2                                                                               
type                : ""                                                                              
up                  : true                                                                            
virtual_parent      : []                                                                              
+ ovn-nbctl clear logical_switch_port ls1p1.11 parent_name                                            
+ ovn-nbctl --wait=sb sync                                                                            
+ ovn-sbctl list port_binding ls1p1.11                                                                
_uuid               : 37fb3f7d-6783-405f-995a-064ae3f3f8a0                                            
chassis             : []                                                                              
datapath            : 1ab6f119-6b73-4c0a-b817-cc7e4ed5b9b2                                            
encap               : []                                                                              
external_ids        : {}                                                                              
gateway_chassis     : []                                                                              
ha_chassis_group    : []                                                                              
logical_port        : ls1p1.11                                                                        
mac                 : ["00:00:00:01:01:01 192.168.1.1 2001::1"]                                       
nat_addresses       : []                                                                              
options             : {}                                                                              
parent_port         : []                                                                              
requested_chassis   : []                                                                              
tag                 : 11                                                                              
tunnel_key          : 5                                                                               
type                : ""                                                                              
up                  : false                                                                           
virtual_parent      : []

<=== up is false

Comment 12 errata-xmlrpc 2022-06-30 17:59:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (ovn bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:5446


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