Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1841194

Summary: Port flooding of packets on br-int causing other VMs to get traffic from neighbours- destination mac not in FDB br-int
Product: Red Hat OpenStack Reporter: Shravan Kumar Tiwari <shtiwari>
Component: openstack-neutronAssignee: Bernard Cafarelli <bcafarel>
Status: CLOSED CURRENTRELEASE QA Contact: Alex Katz <akatz>
Severity: high Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: amuller, apevec, bcafarel, chrisw, jamsmith, mfuruta, rhos-maint, scohen, skaplons
Target Milestone: z12Keywords: Reopened, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-neutron-12.1.1-18.el7ost Doc Type: Enhancement
Doc Text:
This enhancement corrects a condition that caused network traffic flooding with the openvswitch firewall driver. Previously, the lack of an forwarding database (FDB) entry for the destination MAC address of relevant packets caused flooding across all ports in a given VLAN on the integration bridge. Now the traffic is directed only to the correct port.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-28 13:16:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shravan Kumar Tiwari 2020-05-28 15:45:36 UTC
Description of problem:
We have observed that network traffic is flooded across all ports in a given VLAN on the integration bridge due to the lack of a FDB entry for the destination MAC address.

All the tenants are sharing the same provider network & tenant able to see communication between two VMs by taking a tcpdump on a third VM in the same network.

This same issue is reported here upstream :
https://bugs.launchpad.net/neutron/+bug/1825147
https://bugs.launchpad.net/neutron/+bug/1732067


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

How reproducible:

setup:
VM1 running on hypervisor A
VM2 running on hypervisor A
VM3 running on hypervisor B
All 3 VM are in the same external provider network

Steps to Reproduce:
1.Send traffic from VM1 to VM3.
2.Capture traffic on VM2 tap interface
3.

Actual results:
We see packets of network communication betwen VM and VM3 on the tap interface of VM2.


Expected results:
Other VMs on same provider VLAN in the compute must not receive these packets for the communication between other neighbours. 


Additional info:


Customer initially detected this problem using Spirent loadtester tool which is sending traffic streams in between VM's which are deployed with a spirent image to make reporting on the performance and so, when we were sending a traffic stream between VM1 and VM3 we remarked that spirent application was reporting incoming frames on VM2 as well while this should not be the case.


Customer then repeated the test with running ping tests between the spirent vm's which confirmed the same issue, when sending icmp echo requests from vm1 to vm3, also vm2 did receive the icmp echo request.

And when sending icmp echo requests from vm3 to vm1, vm2 was also receiving the icmp echo replies sent back by vm1.



- Start traffic stream from VM1 to VM3 - before the traffic stream is started an ARP request is sent out by VM1 to resolve the ip from VM3 at 14:08:28

Already due to this ARP the mac from VM3 should be in FDB table on br-int of oscar23com014 as VM3 replied to this ARP request so there was an incoming packet from this source mac entering br-int on oscar23com014.

- This is not the case and so when traffic stream is started, there is port flooding and VM2 also receives the frames.


- Then after traffic stream was started as well in other direction from VM3 to VM1 at 14:10:08 - ARP sent out by VM3 for resolving ip from VM1 - due to this ARP fdb of br-int now has mac VM3 and port flooding on VM2 stops shortly after

There are no more packets incoming on vm2 after 14:10:08 as there is no longer port flooding on br-int, this during 5 minutes (=mac aging timer).


- After 5 minutes the mac aging timer expires and trace on vm2 shows again incoming frames as of 14:15:07 due to port flooding

Comment 2 Bernard Cafarelli 2020-05-29 07:35:42 UTC
The fix for relevant upstream bug was backported up to queens and added to OSP 13, updating status and version

Comment 9 Alex Katz 2020-06-07 11:19:04 UTC
verified on 2020-05-19.2

Comment 10 Lon Hohberger 2020-06-25 10:45:41 UTC
According to our records, this should be resolved by openstack-neutron-12.1.1-18.el7ost.  This build is available now.

Comment 12 Shravan Kumar Tiwari 2020-07-24 09:25:29 UTC
Hi,

This issue is still reproducible. Customer had updated their env from 13z11 to 13z12 and sees that the required neutron package i.e. openstack-neutron-12.1.1-18.el7ost is there but we still see that br-int is flooded

When sending continuous packets from VM-1 towards VM-3 the age timer is not reset for the destination mac of VM-3 fa:16:3e:26:b6:d1.
Instead the age timer keeps increasing until it reaches 300 seconds and then the entry is removed from fdb and you have again port flooding and so also VM-2 receives the packets.


Can this be verified further and worked upon for the possible fix?

[root@oscar23com014 ~]# neutron-server --version
neutron-server 12.1.1
[root@oscar23com014 ~]#

[root@oscar23com014 ~]# rpm -qv openstack-neutron
openstack-neutron-12.1.1-18.el7ost.noarch
[root@oscar23com014 ~]# ovs-appctl fdb/show br-int
 port  VLAN  MAC                Age
    3     2  00:22:bd:f8:19:ff  161
    3     1  fa:16:3e:26:b6:d1   38
    5     2  fa:16:3e:7f:62:5b    0
    7     2  fa:16:3e:8b:8d:74    0
    8     1  fa:16:3e:31:37:a2    0
[root@oscar23com014 ~]# ovs-appctl fdb/show br-int
 port  VLAN  MAC                Age
    3     2  00:22:bd:f8:19:ff  168
    3     1  fa:16:3e:26:b6:d1   45
    5     2  fa:16:3e:7f:62:5b    1
    7     2  fa:16:3e:8b:8d:74    0
    8     1  fa:16:3e:31:37:a2    0
[root@oscar23com014 ~]# ovs-appctl fdb/show br-int
 port  VLAN  MAC                Age
    3     2  00:22:bd:f8:19:ff  170
    3     1  fa:16:3e:26:b6:d1   47
    5     2  fa:16:3e:7f:62:5b    1
    7     2  fa:16:3e:8b:8d:74    0
    8     1  fa:16:3e:31:37:a2    0

Comment 13 Bernard Cafarelli 2020-07-27 13:09:27 UTC
Recapping an IRC chat about this, this upstream fix uses a new configuration option: in ovs agent configuration [agent] section:
# When set to True, the accepted egress unicast traffic will not use action
# NORMAL. The accepted egress packets will be taken care of in the final egress
# tables direct output flows for unicast traffic. (boolean value)
#explicitly_egress_direct = false

And related upstream release notes:
https://review.opendev.org/#/c/709410/3/releasenotes/notes/accepted_egress_direct-cc23873e213c6919.yaml

Comment 15 Shravan Kumar Tiwari 2020-08-13 09:04:49 UTC
Hi,

Customer has verified the issue after
- updating env from 13z11 to 13z12
- also updating explicitly_egress_direct to 'true' in /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/ml2/openvswitch_agent.ini in all controllers node.


The port flooding issue remains after the change, the behavior is the same as before.

Summary of setup and observation:
----------------------------------------
setup:
VM1 running on hypervisor A
VM2 running on hypervisor A
VM3 running on hypervisor B
All 3 VM are in the same external provider network

When the destination mac is in the fdb table of br-int on the compute the age timer keeps increasing here even though sending continuous packets and when the mac is then deleted due to age timer expiry you have again port flooding.
 The patch doesn't seem to fix the underlying issue - ingress MACs (coming from br-ex in our case as we use provider networks here) are not learned by br-int, neither when the mac entry is there the aging timer is not reset in case of sending continuously packets.
As indicated in the problem description
1. Only an ARP sent out by VM3 for resolving of the IP of VM1 triggers that the mac of VM3 comes into the FDB table of br-int on the compute node where VM1 is running. When VM3 is just sending packets towards VM1 without first sending out ARP as it already knows the mac, then in this case the mac of VM3 does not come into the FDB table of br-int.
2. Secondly, when the mac of VM3 is listed in FDB table of br-int after ARP, the mac aging timer is not being reset when VM3 continuously is sending packets towards VM1. The mac aging timer expires after 5 minutes causing that the mac of VM3 is removed from the FDB and there is again port flooding on br-int of compute node A when VM1 sends traffic to VM3. On br-ex this does happen correctly. The mac aging timer is reset by incoming packets from this mac of VM3 and not only an ARP triggers the mac/port mapping to become listed in FDB, also when VM3 just starts sending packets towards VM-1 the mac becomes listed in FDB of br-ex on the compute node A where VM1 is running.
Problem seems that incoming packets on br-int do not trigger an update in FDB, neither create the entry in FDB neither reset the mac aging timer of an existing entry.



Thanks,
Shravan

Comment 17 Bernard Cafarelli 2020-08-20 08:24:22 UTC
Also, as upstream bug https://bugs.launchpad.net/neutron/+bug/1732067 can get confusing, confirming this reported issue here is with ovs firewall (which should be fixed by the explicitly_egress_direct option).
Linked to this, an in-progress LP https://review.opendev.org/#/c/738397/ mentions flooding issue on *ingress* packets with this option with potential fix https://review.opendev.org/#/c/738397/

For other cases, note there are still patches in progress for iptables_hybrid firewall https://review.opendev.org/#/c/712640/ and for DVR use case https://review.opendev.org/#/c/715419

Comment 21 Bernard Cafarelli 2020-09-03 12:34:41 UTC
Addressing my mistake after reading comment 15, the explicitly_egress_direct parameter should be set on *compute* nodes, the hypervisors where we want to change behaviour (modifying the L2 agent configuration on another node like controller will not have an effect there).

Comment 29 Bernard Cafarelli 2020-09-28 13:16:46 UTC
After additional checks, with correct packages versions it was confirmed fix is working properly. We can close this bug back then, and keep tracking of tripleo integration in bug #1883214