neutron/neutron/plugins/ml2/drivers/openvswitch/agent
Rodolfo Alonso Hernandez ab8ad6f06d [OVS] Handle added/removed ports in the same polling iteration
The OVS agent processes the port events in a polling loop. It could
happen (and more frequently in a loaded OVS agent) that the "removed"
and "added" events can happen in the same polling iteration. Because
of this, the same port is detected as "removed" and "added".

When the virtual machine is restarted, the port event sequence is
"removed" and then "added". When both events are captured in the same
iteration, the port is already present in the bridge and the port is
discharted from the "removed" list.

Because the port was removed first and the added, the QoS policies do
not apply anymore (QoS and Queue registers, OF rules). If the QoS
policy does not change, the QoS agent driver will detect it and won't
call the QoS driver methods (based on the OVS agent QoS cache, storing
port and QoS rules). This will lead to an unconfigured port.

This patch solves this issue by detecting this double event and
registering it as "removed_and_added". When the "added" port is
handled, the QoS deletion method is called first (if needed) to remove
the unneded artifacts (OVS registers, OF rules) and remove the QoS
cache (port/QoS policy). Then the QoS policy is applied again on the
port.

NOTE: this is going to be quite difficult to be tested in a fullstack
test.

Conflicts:
      neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py

Change-Id: I51eef168fa8c18a3e4cee57c9ff86046ea9203fd
Closes-Bug: #1845161
(cherry picked from commit 50ffa5173d)
(cherry picked from commit 3eceb6d2ae)
(cherry picked from commit 6376391b45)
2020-02-10 17:44:33 +00:00
..
common raise priority of dead vlan drop 2019-10-03 08:02:52 +00:00
extension_drivers Clear residual qos rules after l2-agent restarts. 2019-01-22 12:59:24 +00:00
openflow raise priority of dead vlan drop 2019-10-03 08:02:52 +00:00
__init__.py Restructure agent code in preparation for decomp 2015-06-26 15:06:49 +00:00
main.py Remove unused variables ‘LOG' 2017-11-23 04:33:33 +08:00
ovs_agent_extension_api.py Refactor OVSCookieBridge: always use bridge cookie 2017-03-24 11:22:35 +01:00
ovs_capabilities.py Add agent-side driver scaffolding for trunk functionality 2016-08-18 12:10:22 +00:00
ovs_dvr_neutron_agent.py [DVR] Block ARP to dvr router's port instead of subnet's gateway 2019-06-04 23:12:19 +00:00
ovs_neutron_agent.py [OVS] Handle added/removed ports in the same polling iteration 2020-02-10 17:44:33 +00:00
vlanmanager.py Removed deprecated class LocalVLANMapping 2016-11-07 20:24:06 +00:00