Bug 2208731

Summary: Localnet port traffic is not load balanced on the localnet switch.
Product: Red Hat Enterprise Linux Fast Datapath Reporter: OVN Bot <ovn-bot>
Component: ovn23.03Assignee: Mark Michelson <mmichels>
Status: CLOSED ERRATA QA Contact: ying xu <yinxu>
Severity: unspecified Docs Contact:
Priority: high    
Version: FDP 23.ACC: ctrautma, jiji, jishi, mmichels
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn23.03-23.03.0-49.el8fdp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-06 20:05:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OVN Bot 2023-05-20 04:09:59 UTC
This is an automatically-generated clone of issue https://bugzilla.redhat.com/show_bug.cgi?id=2164652

Comment 3 ying xu 2023-06-26 07:44:48 UTC
reproduced on version:
# rpm -qa|grep ovn23
ovn23.03-central-23.03.0-45.el8fdp.x86_64
ovn23.03-host-23.03.0-45.el8fdp.x86_64
ovn23.03-23.03.0-45.el8fdp.x86_64


# Topology:
# br-phys (localnet) --- ls-pub --- rtr -- ls-priv -- vm1
# - a load balancer applied on ls-pub with backend vm1
# - try to access vm1 via LB from br-phys
ovn-nbctl lr-add rtr
ovn-nbctl lrp-add rtr rtr-ls-pub 00:00:00:00:01:00 41.41.41.1/24
ovn-nbctl lrp-add rtr rtr-ls-priv 00:00:00:00:02:00 42.42.42.1/24
ovn-nbctl ls-add ls-pub
ovn-nbctl ls-add ls-priv

# Localnet
ovn-nbctl lsp-add ls-pub ln
ovn-nbctl lsp-set-type ln localnet
ovn-nbctl lsp-set-addresses ln unknown
ovn-nbctl lsp-set-options ln network_name=phys
ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys
ovs-vsctl add-br br-phys

# Simulate external host on localnet
ip a a dev br-phys 41.41.41.2/24
ip link set dev br-phys up

ovn-nbctl lsp-add ls-pub ls-pub-rtr
ovn-nbctl lsp-set-addresses ls-pub-rtr 00:00:00:00:01:00
ovn-nbctl lsp-set-type ls-pub-rtr router
ovn-nbctl lsp-set-options ls-pub-rtr router-port=rtr-ls-pub

ovn-nbctl lsp-add ls-priv ls-priv-rtr
ovn-nbctl lsp-set-addresses ls-priv-rtr 00:00:00:00:02:00
ovn-nbctl lsp-set-type ls-priv-rtr router
ovn-nbctl lsp-set-options ls-priv-rtr router-port=rtr-ls-priv

# Simulate backend attached to router
ovn-nbctl lsp-add ls-priv vm1
ovn-nbctl lsp-set-addresses vm1 00:00:00:00:00:01
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
ip netns exec vm1 ip r a default via 42.42.42.1
ovs-vsctl set Interface vm1 external_ids:iface-id=vm1

# Add LB to switch and router
ovn-nbctl lb-add lb-test 66.66.66.66:666 42.42.42.2:4242 tcp
ovn-nbctl ls-lb-add ls-pub lb-test

# Add route to 66.66.66.66 and 42.42.42.2
ip r a 66.66.66.66 via 41.41.41.1
ip r a 42.42.42.0/24 via 41.41.41.1

# Start a listener on vm1
ip netns exec vm1 nc -v -k -l 42.42.42.2 4242
Ncat: Version 7.70 ( https://nmap.org/ncat )
Ncat: Listening on 42.42.42.2:4242

# Try to connect from the localnet port:
on the old version:
#nc -v -z 66.66.66.66 666
Ncat: Connection timed out.


on the fixed version:
#nc -v -z 66.66.66.66 666
Ncat: Version 7.70 ( https://nmap.org/ncat )
Ncat: Connected to 66.66.66.66:666.
Ncat: 0 bytes sent, 0 bytes received in 1.09 seconds.
Ncat: Connection from 41.41.41.2.
Ncat: Connection from 41.41.41.2:47902.


set verified.

Comment 5 errata-xmlrpc 2023-07-06 20:05:24 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 (ovn23.03 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-2023:3991