@@ -96,6 +96,20 @@
connected <code>hardware_vtep</code> database changes.
The default value is considered false if this option is not defined.
</dd>
+
+ <dt><code>other_config:ovn-remote-probe-interval</code></dt>
+ <dd>
+ <p>
+ The inactivity probe interval of the connection to the OVN Southbound
+ database, in milliseconds. If the value is zero, it disables the
+ connection keepalive feature.
+ </p>
+
+ <p>
+ If the value is nonzero, then it will be forced to a value of at
+ least 1000 ms.
+ </p>
+ </dd>
</dl>
</p>
</manpage>
@@ -31,6 +31,7 @@
#include "openvswitch/poll-loop.h"
#include "simap.h"
#include "ovsdb-idl.h"
+#include "smap.h"
#include "stream.h"
#include "stream-ssl.h"
#include "unixctl.h"
@@ -88,6 +89,20 @@ check_northd_version(struct ovsdb_idl *vtep_idl, struct ovsdb_idl *ovnsb_idl,
return true;
}
+/* Set probe interval, based on user configuration and the remote. */
+static void
+update_idl_probe_interval(struct ovsdb_idl *ovn_sb_idl,
+ struct ovsdb_idl *vtep_idl)
+{
+ const struct vteprec_global *cfg = vteprec_global_first(vtep_idl);
+ int interval = -1;
+ if (cfg) {
+ interval = smap_get_int(&cfg->other_config,
+ "ovn-remote-probe-interval", interval);
+ }
+ set_idl_probe_interval(ovn_sb_idl, ovnsb_remote, interval);
+}
+
int
main(int argc, char *argv[])
{
@@ -179,6 +194,8 @@ main(int argc, char *argv[])
simap_destroy(&usage);
}
+ update_idl_probe_interval(ovnsb_idl_loop.idl, vtep_idl_loop.idl);
+
if (ovsdb_idl_has_ever_connected(ovnsb_idl_loop.idl) &&
ovsdb_idl_has_ever_connected(vtep_idl_loop.idl) &&
check_northd_version(vtep_idl_loop.idl, ovnsb_idl_loop.idl,
This patch adds new configuration option for ovn-controller-vtep service to supply OVSDB (only OVN_Southbound DB) probe interval value. It can be configured through Hardware_Vtep database, Global table, column other_config:ovn-remote-probe-interval. Signed-off-by: Vladislav Odintsov <odivlad@gmail.com> --- controller-vtep/ovn-controller-vtep.8.xml | 14 ++++++++++++++ controller-vtep/ovn-controller-vtep.c | 17 +++++++++++++++++ 2 files changed, 31 insertions(+)