Bug 1926056 - physical ovs port would be bound to localnet logical switch port if set external_ids:iface-id
Summary: physical ovs port would be bound to localnet logical switch port if set exter...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: ovn2.13
Version: FDP 21.A
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: OVN Team
QA Contact: Jianlin Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-08 06:29 UTC by Jianlin Shi
Modified: 2023-07-13 07:25 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Jianlin Shi 2021-02-08 06:29:45 UTC
Description of problem:
physical ovs port would be bound to local net logical switch port if set external_ids:iface-id

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

How reproducible:
Always

Steps to Reproduce:
systemctl start ovn-northd
ovn-nbctl set-connection ptcp:6641                                                              
ovn-sbctl set-connection ptcp:6642
                                                               
systemctl start openvswitch             
ovs-vsctl set open . external_ids:system-id=hv0 external_ids:ovn-remote=tcp:1.1.173.25:6642 external_ids:ovn-encap-type=geneve external_ids:ovn-encap-ip=1.1.173.25
systemctl start ovn-controller                      

ovs-vsctl add-br br-ln
ovs-vsctl set open . external_ids:ovn-bridge-mappings=lnfoo:br-ln
                           
ovn-nbctl ls-add ls1                  
ovn-nbctl lsp-add ls1 ls1p1                      
ovn-nbctl lsp-set-addresses ls1p1 "00:00:00:01:01:01"
ovn-nbctl lsp-add ls1 ls1p2
ovn-nbctl lsp-set-addresses ls1p2 "00:00:00:01:01:02"
                                                                                                   
ovn-nbctl lsp-add ls1 ls1_ln   
ovn-nbctl lsp-set-type ls1_ln localnet    
ovn-nbctl lsp-set-addresses ls1_ln unknown             
ovn-nbctl lsp-set-options ls1_ln network_name=lnfoo    

ip netns add ls1p1
ovs-vsctl add-port br-int ls1p1 -- set interface ls1p1 type=internal external_ids:iface-id=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 1.1.1.1/24 dev ls1p1 
ip netns exec ls1p1 ip addr add 1111::1/64 dev ls1p1

ip netns add ls1p2
ovs-vsctl add-port br-int ls1p2 -- set interface ls1p2 type=internal external_ids:iface-id=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 1.1.1.2/24 dev ls1p2
ip netns exec ls1p2 ip addr add 1111::2/64 dev ls1p2

ip netns add foo1
ovs-vsctl add-port br-ln foo1 -- set interface foo1 type=internal
ip link set foo1 netns foo1
ip netns exec foo1 ip link set foo1 up
ip netns exec foo1 ip addr ad 1.1.1.3/24 dev foo1
ip netns exec foo1 ip addr add 1111::3/64 dev foo1

ip netns add ls1_ln
ovs-vsctl add-port br-int ls1_ln -- set interface ls1_ln type=internal external_ids:iface-id=ls1_ln
ip link set ls1_ln netns ls1_ln
ip netns exec ls1_ln ip link set ls1_ln up
ip netns exec ls1_ln ip addr add 1.1.1.10/24 dev ls1_ln
ip netns exec ls1_ln ip addr add 1111::10/64 dev ls1_ln

ovn-sbctl show
ip netns exec ls1p1 ping 1.1.1.3 -c 1

Actual results:
[root@wsfd-advnetlab21 test]# ovn-sbctl show                                                          
Chassis hv0                                                                                           
    hostname: wsfd-advnetlab21.anl.lab.eng.bos.redhat.com                                             
    Encap geneve                                                                                      
        ip: "1.1.173.25"                                                                              
        options: {csum="true"}                                                                        
    Port_Binding ls1_ln  

<=== localnet port is bound
                                                                             
    Port_Binding ls1p1                                                                                
    Port_Binding ls1p2

fail to ping 1.1.1.3
Expected results:
localnet should not be bound, and ping passed

Additional info:

[root@wsfd-advnetlab21 test]# rpm -qa | grep -E "openvswitch2.13|ovn2.13"                             
ovn2.13-central-20.12.0-9.el8fdp.x86_64                                                               
openvswitch2.13-2.13.0-93.el8fdp.x86_64                                                               
ovn2.13-host-20.12.0-9.el8fdp.x86_64                                                                  
ovn2.13-20.12.0-9.el8fdp.x86_64


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