neutron/neutron/tests/common
Oleg Bondarev 9d5cea0e2b Make sure "dead vlan" ports cannot transmit packets
https://review.opendev.org/c/openstack/neutron/+/820897 added
a dead vlan flow that pushes the dead vlan tag onto frames
belonging to dead ports before these ports are reassigned to
their proper vlans. However add_flow and delete_flows race and
delete_flows may run before add_flow, in this case deleting 0 flows
but not giving us a chance to detect this: neither does it throw
an error nor does it return the number of deleted flows.
This leads to port staying inaccessible forever and hence
breaks corresponding DHCP or router.

Current patch suggests another approach to make sure no packets are
leaked from newly plugged ports: setting their "vlan_mode" attribute
to "trunk" and "trunks"=[4095] (along with assigning dead VLAN tag).
With this OVS normal pipeline will allow only packets tagged with 4095
from such ports [1], which normally not happens, but even if it does -
default rule in br-int will drop them anyway.
Thus untagged packets from such ports will also be dropped until
ovs agent sets proper VLAN tag and clears vlan_mode to default
("access").

This approach avoids the race between dhcp/l3 and ovs agents because
dhcp/l3 agents no longer modify flow table.

This partially reverts commit 7aae31c9f9

[1] https://docs.openvswitch.org/en/latest/ref/ovs-actions.7/?highlight=ovs-actions#the-ovs-normal-pipeline

Closes-Bug: #1930414
Closes-Bug: #1959564
Change-Id: I0391dd24224f8656a09ddb002e7dae8783ba37a4
(cherry picked from commit 0ddca28454)
2022-02-08 07:23:17 +00:00
..
agents Complete removal of dependency on the "mock" package 2020-05-01 12:05:34 -04:00
exclusive_resources use synchronized lock decorator from neutron-lib 2017-10-04 13:57:42 -06:00
__init__.py Avoid eventlet monkey patching for the tempest plugin 2016-04-29 22:47:24 -05:00
base.py Remove references to unittest2 library 2020-01-14 09:03:26 +00:00
config_fixtures.py Remove "six" library 2020-07-28 16:55:52 +00:00
conn_testers.py Make sure "dead vlan" ports cannot transmit packets 2022-02-08 07:23:17 +00:00
helpers.py Fix stopping timer in TestTimer 2021-01-19 13:43:58 +01:00
l3_test_common.py Remove "six" library 2020-07-28 16:55:52 +00:00
machine_fixtures.py Merge "fullstack: test for IPv6 north-south traffic" 2016-11-09 12:02:45 +00:00
net_helpers.py Make sure "dead vlan" ports cannot transmit packets 2022-02-08 07:23:17 +00:00