neutron/neutron/tests/unit/plugins/ml2
Rodolfo Alonso Hernandez 50ffa5173d [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.

Change-Id: I51eef168fa8c18a3e4cee57c9ff86046ea9203fd
Closes-Bug: #1845161
2019-12-05 17:39:55 +00:00
..
drivers [OVS] Handle added/removed ports in the same polling iteration 2019-12-05 17:39:55 +00:00
extensions Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
__init__.py Reorganize unit test tree 2015-04-06 23:28:31 +00:00
_test_mech_agent.py Check mech driver connectivity during port binding 2019-09-11 07:05:54 +00:00
base.py use service type constants from neutron_lib plugins 2017-06-27 15:16:05 -06:00
test_agent_scheduler.py Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
test_db.py Incorporate capability for multiple mac generation 2018-11-08 09:43:33 -05:00
test_driver_context.py Use objects instead of SQLA deep copies in PortContext 2017-06-20 01:34:10 -07:00
test_ext_portsecurity.py PSExtDriverTestCase: initialize variable in case of exception 2019-10-30 17:44:45 -04:00
test_extension_driver_api.py Use constant IP_VERSION_4/6 in unit tests 2018-08-27 21:45:39 +00:00
test_managers.py Check mech driver connectivity during port binding 2019-09-11 07:05:54 +00:00
test_ovo_rpc.py Stop loading OVOServerRpcInterface in ML2 testcase 2017-04-18 01:27:37 -07:00
test_plugin.py Revert "Revise log when create port failed" 2019-11-29 14:27:10 +00:00
test_port_binding.py Drive binding by placement allocation 2019-03-09 22:03:51 +00:00
test_rpc.py Only notify nova of port status changes if configured 2019-09-13 19:54:56 +00:00
test_security_group.py Start enforcing E125 flake8 directive 2019-07-19 23:39:41 -04:00
test_tracked_resources.py use core resource api defs from lib 2017-11-08 09:48:50 -07:00