Bug 1861298 - ovn-controller is not releasing a logical port if the ovs interface ofport is -1
Summary: ovn-controller is not releasing a logical port if the ovs interface ofport is -1
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.13
Version: RHEL 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Numan Siddique
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-28 09:05 UTC by Numan Siddique
Modified: 2020-08-18 11:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-18 11:23:52 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ovn-org/ovn/commit/772e040218553fa736457eb3f46a28e937b14045 0 None None None 2020-08-07 18:35:38 UTC
Red Hat Product Errata RHBA-2020:3488 0 None None None 2020-08-18 11:23:54 UTC

Description Numan Siddique 2020-07-28 09:05:10 UTC
Description of problem:

ovn-nbctl ls-add sw0

ovn-nbctl lsp-add sw0 sw0-p1
ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3"
ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3"

ovs-vsctl add-port br-int p1 -- \
    set Interface p1 external_ids:iface-id=sw0-p1 -- \
    set Interface p1 type=internal

# the port should be up
ovn-nbctl lsp-get-up sw0-port1

ovn-sbctl show

ovs-vsctl set interface p1 type=\"\"

# the ofport of p1 interface will be -1.
ovs-vsctl get interface p1 ofport

# The logical port should be down. But its not
ovn-nbctl lsp-get-up sw0-port1

ovn-sbctl show


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-07-29 03:24:13 UTC
reproduced with following script on ovn2.13.0-20.06.1-4:

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

ovn-nbctl ls-add sw0

ovn-nbctl lsp-add sw0 sw0-p1
ovn-nbctl lsp-set-addresses sw0-p1 "50:54:00:00:00:03 10.0.0.3"
ovn-nbctl lsp-set-port-security sw0-p1 "50:54:00:00:00:03 10.0.0.3"

ovs-vsctl add-port br-int p1 -- \
    set Interface p1 external_ids:iface-id=sw0-p1 -- \
    set Interface p1 type=internal

while ! ovn-sbctl show | grep sw0-p1
do
    sleep 1
done

# the port should be up
ovn-nbctl lsp-get-up sw0-p1

ovn-sbctl show

ovs-vsctl set interface p1 type=\"\"

# the ofport of p1 interface will be -1.
ovs-vsctl get interface p1 ofport
sleep 5

# The logical port should be down. But its not
ovn-nbctl lsp-get-up sw0-p1

ovn-sbctl show

result:

+ ovn-sbctl show                       
+ grep sw0-p1                                        
+ sleep 1                      
+ ovn-sbctl show                    
+ grep sw0-p1                              
    Port_Binding sw0-p1    
+ ovn-nbctl lsp-get-up sw0-p1
up                                
+ ovn-sbctl show                  
Chassis hv1                                                                                                                                                                                                
    hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com
    Encap geneve
        ip: "20.0.50.26"
        options: {csum="true"}
    Port_Binding sw0-p1     
+ ovs-vsctl set interface p1 'type=""'                         
+ ovs-vsctl get interface p1 ofport                                
-1
+ sleep 5                        
+ ovn-nbctl lsp-get-up sw0-p1                         
up    

<=== still up
                            
+ ovn-sbctl show
Chassis hv1                         
    hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com
    Encap geneve
        ip: "20.0.50.26"
        options: {csum="true"}
    Port_Binding sw0-p1
[root@hp-dl380pg8-13 bz1861298]# rpm -qa | grep -E "openvswitch|ovn"
openvswitch2.13-2.13.0-39.el7fdp.x86_64
ovn2.13-central-20.06.1-4.el7fdp.x86_64
openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch
ovn2.13-20.06.1-4.el7fdp.x86_64     
ovn2.13-host-20.06.1-4.el7fdp.x86_64

Verified on ovn2.13.0-20.06-6:

+ ovn-sbctl show
+ grep sw0-p1
+ sleep 1
+ ovn-sbctl show
+ grep sw0-p1
    Port_Binding sw0-p1
+ ovn-nbctl lsp-get-up sw0-p1
up
+ ovn-sbctl show
Chassis hv1
    hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com
    Encap geneve
        ip: "20.0.50.26"
        options: {csum="true"}
    Port_Binding sw0-p1
+ ovs-vsctl set interface p1 'type=""'
+ ovs-vsctl get interface p1 ofport
-1
+ sleep 5
+ ovn-nbctl lsp-get-up sw0-p1
down

<=== status is down

+ ovn-sbctl show
Chassis hv1
    hostname: hp-dl380pg8-13.rhts.eng.pek2.redhat.com
    Encap geneve
        ip: "20.0.50.26"
        options: {csum="true"}
[root@hp-dl380pg8-13 bz1861298]# rpm -qa | grep -E "openvswitch|ovn"
openvswitch2.13-2.13.0-39.el7fdp.x86_64
ovn2.13-host-20.06.1-6.el7fdp.x86_64
openvswitch-selinux-extra-policy-1.0-15.el7fdp.noarch
ovn2.13-central-20.06.1-6.el7fdp.x86_64
ovn2.13-20.06.1-6.el7fdp.x86_64

Comment 4 Jianlin Shi 2020-07-30 01:20:55 UTC
Verified on rhel8 version:

+ ovs-vsctl add-port br-int p1 -- set Interface p1 external_ids:iface-id=sw0-p1 -- set Interface p1 type=internal
+ ovn-sbctl show                                                                                      
+ grep sw0-p1                                                                                         
+ sleep 1                                                                                             
+ ovn-sbctl show                                                                                      
+ grep sw0-p1                                                                                         
    Port_Binding sw0-p1                                                                               
+ ovn-nbctl lsp-get-up sw0-p1                                                                         
up                                                                                                    
+ ovn-sbctl show                                                                                      
Chassis hv1                                                                                           
    hostname: dell-per740-42.rhts.eng.pek2.redhat.com
    Encap geneve                                                                                      
        ip: "20.0.50.25"                                                                              
        options: {csum="true"}                                                                        
    Port_Binding sw0-p1                                                                               
+ ovs-vsctl set interface p1 'type=""'                                                                
+ ovs-vsctl get interface p1 ofport                                                                   
-1                                                                                                    
+ sleep 5                                                                                             
+ ovn-nbctl lsp-get-up sw0-p1                                                                         
down                                                                                                  
+ ovn-sbctl show                                                                                      
Chassis hv1                                                                                           
    hostname: dell-per740-42.rhts.eng.pek2.redhat.com
    Encap geneve                                                                                      
        ip: "20.0.50.25"                                                                              
        options: {csum="true"}                                                                        
[root@dell-per740-42 bz1861298]# rpm -qa | grep -E "openvswitch|ovn"
openvswitch-selinux-extra-policy-1.0-23.el8fdp.noarch
ovn2.13-host-20.06.1-6.el8fdp.x86_64
openvswitch2.13-2.13.0-48.el8fdp.x86_64
ovn2.13-central-20.06.1-6.el8fdp.x86_64
ovn2.13-20.06.1-6.el8fdp.x86_64

Comment 6 errata-xmlrpc 2020-08-18 11:23:52 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 (ovn2.13 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-2020:3488


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