]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
OVS agent: handle deleted ports on each rpc_loop iteration
authorOleg Bondarev <obondarev@mirantis.com>
Thu, 3 Sep 2015 13:31:33 +0000 (16:31 +0300)
committergongysh <gong.yongsheng@99cloud.net>
Sat, 5 Sep 2015 05:06:06 +0000 (05:06 +0000)
Currently rpc loop processes ports only in case polling is required
(message from ovsdb monitor) or there are port_updated notifications from
server or security group notifications.
In case of just port_deleted notifications port processing is not
triggered during rpc loop.
This may lead to agent accumulating a big amount of deleted ports
and processing all of them at once during next iteration when polling is
required or any notification from server, which might be quite tough for
the agent. Tough means agent will be irresponsive while processing deleted
ports.
The patch makes port deletion processing more gradual.

Closes-Bug: #1491922
Change-Id: I0e1f6dfbf5b56fb18a978d6214e1768560d8ac98

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

index 11ff150bbccf37063d35478b9b2a0e0f0d11c58b..26771f449bda470ba366eb4cd80947ef18125778 100644 (file)
@@ -1550,6 +1550,7 @@ class OVSNeutronAgent(sg_rpc.SecurityGroupAgentRpcCallbackMixin,
     def _agent_has_updates(self, polling_manager):
         return (polling_manager.is_polling_required or
                 self.updated_ports or
+                self.deleted_ports or
                 self.sg_agent.firewall_refresh_needed())
 
     def _port_info_has_changes(self, port_info):