Yield control to other greenthreads while processing trusted ports
process_trusted_ports() appeared to be greenthread unfriendly, so
if there are many trusted ports on a node, openvswitch agent may
"hang" for a significant time.
This patch adds explicit yield.
Change-Id: I7c00812f877e2fc966bbac3060e1187ce1b809ca
Closes-Bug: #1836023
(cherry picked from commit da539da378
)
This commit is contained in:
parent
249549379c
commit
fe403825ab
@ -15,6 +15,7 @@
|
||||
|
||||
import collections
|
||||
|
||||
import eventlet
|
||||
import netaddr
|
||||
from neutron_lib import constants as lib_const
|
||||
from oslo_log import log as logging
|
||||
@ -568,6 +569,8 @@ class OVSFirewallDriver(firewall.FirewallDriver):
|
||||
"""Pass packets from these ports directly to ingress pipeline."""
|
||||
for port_id in port_ids:
|
||||
self._initialize_egress_no_port_security(port_id)
|
||||
# yield to let other greenthreads proceed
|
||||
eventlet.sleep(0)
|
||||
|
||||
def remove_trusted_ports(self, port_ids):
|
||||
for port_id in port_ids:
|
||||
|
Loading…
Reference in New Issue
Block a user