]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Minimize ovs l2 agent calls to get_vif_port_set()
authorMaru Newby <marun@redhat.com>
Thu, 22 Aug 2013 07:57:00 +0000 (07:57 +0000)
committerMaru Newby <marun@redhat.com>
Fri, 23 Aug 2013 21:30:15 +0000 (21:30 +0000)
commit1f9b4e77d93b165a0aeeaae0de610389debd5198
tree9d45605a6fbe5ddabb91f8de3b4ddb854fc75a21
parent1c2e111a0be07c9005e212ca634a1ea174f616a5
Minimize ovs l2 agent calls to get_vif_port_set()

The ovs l2 agent was previously calling get_vif_port_set() on the
integration bridge once per rpc_loop() iteration and then again in
the periodic _report_state() call that returns the current device
count to the neutron service.  Since get_vif_port_set() is an
expensive call (relying on shell commands) and since there
is minimal risk associated with reporting stats that are a few
seconds old, this patch caches the device count for reuse by
_report_state().

Partial-Bug: 1177973

Change-Id: Ice73384ed1ba1e97120028cd0a9bff94a62a41a4
neutron/plugins/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/openvswitch/test_ovs_neutron_agent.py