This patch is adding a new method set_probe_interval() to the Idl class
which allows configuring the probe interval for the IDL session.
Instances of Idl might want to tune this interval to be less agressive
than the current 5s one.

Reported-at: https://bugs.launchpad.net/networking-ovn/+bug/1680146
Signed-off-by: Lucas Alvares Gomes <lucasago...@gmail.com>
---
 python/ovs/db/idl.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/python/ovs/db/idl.py b/python/ovs/db/idl.py
index 079a03ba1..d3c0086c6 100644
--- a/python/ovs/db/idl.py
+++ b/python/ovs/db/idl.py
@@ -147,6 +147,15 @@ class Idl(object):
             table.condition = [True]
             table.cond_changed = False

+    def set_probe_interval(self, probe_interval):
+        """Sets the probe interval for the IDL session, in milliseconds.
+
+        If "probe_interval" is zero it disables the connection keepalive
+        feature. If non-zero the value will be forced to at least 1000
+        milliseconds.
+        """
+        self._session.reconnect.set_probe_interval(probe_interval)
+
     def close(self):
         """Closes the connection to the database.  The IDL will no longer
         update."""
-- 
2.12.1
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to