The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1779112 - [OVN] ovn-controller virtual port unbinding might trigger multiple SB DB updates
Summary: [OVN] ovn-controller virtual port unbinding might trigger multiple SB DB updates
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.11
Version: RHEL 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Dumitru Ceara
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On: 1779110 1779114
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-03 10:40 UTC by Dumitru Ceara
Modified: 2020-01-21 17:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1779110
Environment:
Last Closed: 2020-01-21 17:02:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0190 0 None None None 2020-01-21 17:02:50 UTC

Description Dumitru Ceara 2019-12-03 10:40:36 UTC
+++ This bug was initially created as a clone of Bug #1779110 +++

Description of problem:
In the case when a virtual port binding is processed by ovn-controller before its virtual_parent, consider_local_datapath might not release it in the current     ovn-controller iteration even though the virtual_parent gets released.

Backport of upstream commit:
https://github.com/ovn-org/ovn/commit/5309099ec38cf41f4e41f1929c408741a3146dac

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Jianlin Shi 2020-01-06 08:57:20 UTC
reproduced on ovn2.11-2.11.1-8.el8fdp.x86_64 with following steps:

[root@dell-per740-12 bz1779110]# bash -x setup.sh                                                     
+ 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.30.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=20.0.30.25
+ systemctl restart ovn-controller
+ ovn-nbctl ls-add ls
+ ovn-nbctl lsp-add ls vm1
+ ovn-nbctl lsp-set-addresses vm1 00:00:00:00:00:01
+ ovn-nbctl lsp-add ls vm2
+ ovn-nbctl lsp-set-addresses vm1 00:00:00:00:00:02
+ ip netns add vm1
+ ovs-vsctl add-port br-int vm1 -- set interface vm1 type=internal                                    
+ ip link set vm1 netns vm1
+ ip netns exec vm1 ip link set vm1 address 00:00:00:00:00:01                                         
+ ip netns exec vm1 ip addr add 42.42.42.2/24 dev vm1                                                 
+ ip netns exec vm1 ip link set vm1 up
+ ovs-vsctl set Interface vm1 external_ids:iface-id=vm1                                               
+ ip netns add vm2
+ ovs-vsctl add-port br-int vm2 -- set interface vm2 type=internal
+ ip link set vm2 netns vm2
+ ip netns exec vm2 ip link set vm2 address 00:00:00:00:00:02
+ ip netns exec vm2 ip addr add 42.42.42.3/24 dev vm2
+ ip netns exec vm2 ip link set vm2 up
+ ovs-vsctl set Interface vm2 external_ids:iface-id=vm2                                               
+ ovn-nbctl lsp-add ls vm-virt                                                                        
+ ovn-nbctl lsp-set-type vm-virt virtual                                                              
+ ovn-nbctl set logical_switch_port vm-virt options:virtual-ip=42.42.42.42
+ ovn-nbctl set logical_switch_port vm-virt options:virtual-parents=vm1,vm2                           
+ ip netns exec vm1 ip addr add dev vm1 42.42.42.42/24                                                
+ ip netns exec vm1 arping -I vm1 -s 42.42.42.42 42.42.42.42 -c 10                                    
ARPING 42.42.42.42 from 42.42.42.42 vm1                                                               
Sent 10 probes (10 broadcast(s))                                                                      
Received 0 response(s)                                                                                
+ ovs-appctl -t ovn-controller vlog/set main::DBG                                                     
+ ovs-appctl -t ovn-controller vlog/set binding::DBG                                                  
+ ovs-vsctl clear interface vm1 external_ids  

[root@dell-per740-12 bz1779110]# rpm -qa | grep -E "openvswitch|ovn"                                  
ovn2.11-central-2.11.1-8.el8fdp.x86_64                                                                
openvswitch-selinux-extra-policy-1.0-19.el8fdp.noarch                                                 
kernel-kernel-networking-openvswitch-ovn_ha-1.0-50.noarch                                             
openvswitch2.11-2.11.0-35.el8fdp.x86_64                                                               
ovn2.11-host-2.11.1-8.el8fdp.x86_64                                                                   
ovn2.11-2.11.1-8.el8fdp.x86_64

log in /var/log/openvswitch/ovn-controller.log:

2020-01-06T08:53:32.391Z|00024|binding|INFO|Releasing lport vm1 from this chassis.
2020-01-06T08:53:32.391Z|00025|main|DBG|removing ct zone 2 for 'vm1'
2020-01-06T08:53:32.393Z|00026|main|DBG|engine did not run, and it was not needed either: br_int 0x5611
0ce380720, chassis 0x5610ce389090
2020-01-06T08:53:32.394Z|00027|main|DBG|engine did not run, force recompute next time: br_int 0x5610cee
380720, chassis 0x5610ce389090
2020-01-06T08:53:32.394Z|00028|binding|INFO|Releasing lport vm-virt from this chassis.


Verified on 2.11.1-24:

[root@dell-per740-12 bz1779110]# rpm -qa | grep -E "openvswitch|ovn"
ovn2.11-central-2.11.1-24.el8fdp.x86_64
openvswitch-selinux-extra-policy-1.0-19.el8fdp.noarch                                                 
kernel-kernel-networking-openvswitch-ovn_ha-1.0-50.noarch                                             
openvswitch2.11-2.11.0-35.el8fdp.x86_64                                                               
ovn2.11-2.11.1-24.el8fdp.x86_64                                                                       
ovn2.11-host-2.11.1-24.el8fdp.x86_64 

2020-01-06T08:56:27.605Z|00026|binding|INFO|Releasing lport vm1 from this chassis.                    
2020-01-06T08:56:27.605Z|00027|binding|INFO|Releasing lport vm-virt from this chassis.

Comment 4 Jianlin Shi 2020-01-06 09:35:17 UTC
reproduced on ovn2.11-2.11.1-8.el7fdp.x86_64  : 

[root@hp-dl380pg8-12 bz1779110]# rpm -qa | grep -E "openvswitch|ovn"                                  
ovn2.11-central-2.11.1-8.el7fdp.x86_64                                                                
openvswitch-selinux-extra-policy-1.0-14.el7fdp.noarch                                                 
ovn2.11-2.11.1-8.el7fdp.x86_64                                                                        
ovn2.11-host-2.11.1-8.el7fdp.x86_64                                                                   
openvswitch2.11-2.11.0-35.el7fdp.x86_64

2020-01-06T09:31:32.835Z|00022|binding|INFO|Releasing lport vm1 from this chassis.                    
2020-01-06T09:31:32.835Z|00023|main|DBG|removing ct zone 2 for 'vm1'                                  
2020-01-06T09:31:32.836Z|00024|main|DBG|engine did not run, and it was not needed either: br_int 0x56 
2f56976090, chassis 0x562f5697ab60                                                                    
2020-01-06T09:31:32.836Z|00025|main|DBG|engine did not run, force recompute next time: br_int 0x562f5 
6976090, chassis 0x562f5697ab60                                                                   

<== log between two releasing
    
2020-01-06T09:31:32.837Z|00026|binding|INFO|Releasing lport vm-virt from this chassis.

Verified on ovn2.11-2.11.1-24.el7fdp.x86_64:

[root@hp-dl380pg8-12 bz1779110]# rpm -qa | grep -E "openvswitch|ovn"                                  
ovn2.11-host-2.11.1-24.el7fdp.x86_64                                                                  
openvswitch-selinux-extra-policy-1.0-14.el7fdp.noarch                                                 
ovn2.11-central-2.11.1-24.el7fdp.x86_64                                                               
openvswitch2.11-2.11.0-35.el7fdp.x86_64                                                               
ovn2.11-2.11.1-24.el7fdp.x86_64


2020-01-06T09:34:08.272Z|00026|binding|INFO|Releasing lport vm1 from this chassis.     

<== no log between two releasing
               
2020-01-06T09:34:08.272Z|00027|binding|INFO|Releasing lport vm-virt from this chassis.

Comment 6 errata-xmlrpc 2020-01-21 17:02:46 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, 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-2020:0190


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