commit 503bbdab871763860e615b923d8db12c1511a4f5
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Oct 22 14:21:08 2019 +0000
[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.
Reviewed: https:/ /review. opendev. org/706905 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=503bbdab871 763860e615b923d 8db12c1511a4f5
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 503bbdab8717638 60e615b923d8db1 2c1511a4f5
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Tue Oct 22 14:21:08 2019 +0000
[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 and_added" . When the "added" port is
registering it as "removed_
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: I51eef168fa8c18 a3e4cee57c9ff86 046ea9203fd fd0fe7264e4b2a9 05753f86ec)
Closes-Bug: #1845161
(cherry picked from commit 50ffa5173db03b0