Bug 1986484

Summary: [OVN] Metadata issues on SR-IOV environment
Product: Red Hat Enterprise Linux Fast Datapath Reporter: Numan Siddique <nusiddiq>
Component: OVNAssignee: Numan Siddique <nusiddiq>
Status: CLOSED ERRATA QA Contact: Jianlin Shi <jishi>
Severity: high Docs Contact:
Priority: high    
Version: FDP 20.HCC: apevec, ctrautma, ekuris, eolivare, ihrachys, jiji, jlibosva, kfida, ksambor, lhh, lmartins, majopela, mmichels, nusiddiq, rsafrono, scohen, spower
Target Milestone: ---Keywords: Regression, TestOnly, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovn-2021-21.06.0-17 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1974061 Environment:
Last Closed: 2021-07-29 20:05:04 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:
Bug Depends On: 1974061, 1974062    
Bug Blocks:    

Comment 1 Numan Siddique 2021-07-27 17:25:00 UTC
Steps to reproduce in OVN environment
----


ovn-nbctl ls-add sw0
ovn-nbctl lsp-add sw0 sw0-p1
ovn-nbctl lsp-set-addreses sw0-p1 "MAC1 IP1"

ovn-nbctl lsp-add sw0 sw0-lp
ovn-nbctl lsp-set-addreses sw0-lp "MAC2 IP2"

ovn-nbctl lsp-set-type sw0-lp localnet


---
# Create 2 fake vms for these 2 ports in one chassis and ping from sw0-p1 to sw0-lp.

The ping fails.
Run - ovn-appctl -t ovn-controller recompute
After the above command ping works.

Before and after recompute run - ovs-ofctl dump-flows br-int table=38

Ideally the output should be same.  But that is not the case.

With the fixed version ovn-2021-21.06.0-17, ping should work without any recompute
and the flows in table 38 should be the same before and after recompute.

Comment 6 errata-xmlrpc 2021-07-29 20:05:04 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-2021:2969

Comment 7 Jianlin Shi 2021-08-03 08:19:56 UTC
full script for test:

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

# sleep is needed for reproducing the issue
sleep 5

mac1=00:de:ad:01:00:01
ip1=172.16.102.11
mac2=00:de:ad:01:01:01
ip2=172.16.102.12

ovn-nbctl ls-add sw0

ovn-nbctl lsp-add sw0 sw0-p1
ovn-nbctl lsp-set-addresses sw0-p1 "$mac1 $ip1"

ovn-nbctl lsp-add sw0 sw0-lp
ovn-nbctl lsp-set-addresses sw0-lp "$mac2 $ip2"

ovn-nbctl lsp-set-type sw0-lp localnet

ovs-vsctl add-port br-int sw0-p1 -- set interface sw0-p1 type=internal external_ids:iface-id=sw0-p1
ip netns add sw0-p1
ip link set sw0-p1 netns sw0-p1
ip netns exec sw0-p1 ip link set sw0-p1 address $mac1
ip netns exec sw0-p1 ip link set sw0-p1 up
ip netns exec sw0-p1 ip addr add $ip1/24 dev sw0-p1
ip netns exec sw0-p1 ip addr add 2001::1/64 dev sw0-p1

ovs-vsctl add-port br-int sw0-lp -- set interface sw0-lp type=internal external_ids:iface-id=sw0-lp
ip netns add sw0-lp
ip link set sw0-lp netns sw0-lp
ip netns exec sw0-lp ip link set sw0-lp address $mac2
ip netns exec sw0-lp ip link set sw0-lp up
ip netns exec sw0-lp ip addr add $ip2/24 dev sw0-lp
ip netns exec sw0-lp ip addr add 2001::2/64 dev sw0-lp

sleep 2

ip netns exec sw0-p1 ping 172.16.102.12 -c 2
ip netns exec sw0-p1 ping6 2001::2 -c 2
ovs-ofctl --no-stats dump-flows br-int table=38 > flow_before
ovn-appctl -t ovn-controller recompute
ip netns exec sw0-p1 ping 172.16.102.12 -c 2
ip netns exec sw0-p1 ping6 2001::2 -c 2
ovs-ofctl --no-stats dump-flows br-int table=38 > flow_after
diff flow_before flow_after

double checked that the problem still exist on ovn2.13-20.12.0-161.el8. but fixed on ovn2.13-20.12.0-171.el8.

@numan, FYI

Comment 8 Red Hat Bugzilla 2023-09-15 01:12:08 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days