neutron/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb
Daniel Alvarez Sanchez b767825d13 [ovn] Stop monitoring the SB MAC_Binding table to reduce mem footprint
The MAC_Binding table in the SB database may grow indefinitely (due
to a lack of an aging mechanism of its entries) and eventually
lead to OOM killers for neutron-server which maintains an in-memory
copy of the database.

In order to stop monitoring this table, this patch is invoking
the ovsdb-client tool to remove the entries associated to
Floating IPs that have just been detached. The execution of this
tool is really fast as it will just invoke a JSON-RPC transact command
which doesn't require downloading the database contents.

In a scale test, the memory consumption of neutron-server dropped
from 75GB to 7GB with this patch.

Closes-Bug: #1946318

Conflicts:
  neutron/plugins/ml2/drivers/ovn/mech_driver/mech_driver.py
  neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py
  neutron/tests/unit/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py

Note: The functional test has been changed for this stable branch
because the update_tables() method from ovsdbapp is not availabie for
this version of Neutron. So I changed the functional test to add the
MAC_Binding entry via ovsdb-client instead of using ovsdbapp to do so.

Signed-off-by: Daniel Alvarez Sanchez <dalvarez@redhat.com>
Change-Id: Id84bf17953527c415d611bfc198038fb6f811de3
(cherry picked from commit f6c3552769)
2021-10-26 13:32:15 +01:00
..
extensions [OVN] External ports (SR-IOV) QoS is handled by SR-IOV agent 2021-04-02 09:59:16 +00:00
__init__.py [OVN] Import ovsdb related code 2019-12-04 13:18:50 +00:00
api.py ovn: Remove is_port_groups_supported() code 2020-06-22 09:54:13 +00:00
backports.py Avoid race condition when processing RowEvents 2021-02-19 21:56:47 +00:00
commands.py Remove some unnecessary usages of verify() 2020-09-03 17:56:19 -04:00
impl_idl_ovn.py [OVN] Update the DHCP options when the metadata port is modified 2021-10-15 10:07:17 +00:00
maintenance.py [OVN] Tune OVN routers to reduce the mem footprint for ML2/OVN 2021-10-18 13:29:09 +01:00
ovn_client.py Merge "[OVN] Tune OVN routers to reduce the mem footprint for ML2/OVN" into stable/ussuri 2021-10-20 18:23:19 +00:00
ovn_db_sync.py ovn: Don't use dict.remove() for filtering dhcp ports in db-sync 2021-06-18 09:47:35 +02:00
ovsdb_monitor.py [ovn] Stop monitoring the SB MAC_Binding table to reduce mem footprint 2021-10-26 13:32:15 +01:00
worker.py [OVN] Import ovsdb related code 2019-12-04 13:18:50 +00:00