@@ -35,6 +35,7 @@
#include "lib/ovn-util.h"
#include "memory.h"
#include "openvswitch/poll-loop.h"
+#include "ovsdb-idl.h"
#include "simap.h"
#include "smap.h"
#include "sset.h"
@@ -1871,6 +1872,31 @@ update_ssl_config(void)
}
}
+static void
+update_idl_probe_interval(struct ovsdb_idl *ovn_sb_idl,
+ struct ovsdb_idl *ovn_nb_idl,
+ struct ovsdb_idl *ovn_icsb_idl,
+ struct ovsdb_idl *ovn_icnb_idl)
+{
+ const struct nbrec_nb_global *nb = nbrec_nb_global_first(ovn_nb_idl);
+ int interval = -1;
+ if (nb) {
+ interval = smap_get_int(&nb->options, "ic_probe_interval", interval);
+ }
+ set_idl_probe_interval(ovn_sb_idl, ovnsb_db, interval);
+ set_idl_probe_interval(ovn_nb_idl, ovnnb_db, interval);
+
+ const struct icnbrec_ic_nb_global *icnb =
+ icnbrec_ic_nb_global_first(ovn_icnb_idl);
+ int ic_interval = -1;
+ if (icnb) {
+ ic_interval = smap_get_int(&icnb->options, "ic_probe_interval",
+ ic_interval);
+ }
+ set_idl_probe_interval(ovn_icsb_idl, ovn_ic_sb_db, ic_interval);
+ set_idl_probe_interval(ovn_icnb_idl, ovn_ic_nb_db, ic_interval);
+}
+
int
main(int argc, char *argv[])
{
@@ -2071,6 +2097,8 @@ main(int argc, char *argv[])
state.paused = false;
while (!exiting) {
update_ssl_config();
+ update_idl_probe_interval(ovnsb_idl_loop.idl, ovnnb_idl_loop.idl,
+ ovnisb_idl_loop.idl, ovninb_idl_loop.idl);
memory_run();
if (memory_should_report()) {
struct simap usage = SIMAP_INITIALIZER(&usage);
@@ -47,6 +47,20 @@
This column provides general key/value settings. The supported
options are described individually below.
</column>
+
+ <column name="options" key="ic_probe_interval">
+ <p>
+ The inactivity probe interval of the connection to the OVN IC
+ Northbound and Southbound databases from <code>ovn-ic</code>, 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>
+ </column>
</group>
<group title="Connection Options">
@@ -202,6 +202,19 @@
</p>
</column>
+ <column name="options" key="ic_probe_interval">
+ <p>
+ The inactivity probe interval of the connection to the OVN Northbound
+ and Southbound databases from <code>ovn-ic</code>, 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>
+ </column>
+
<column name="options" key="northd_trim_timeout">
<p>
When used, this configuration value specifies the time, in
IDL to local AZ DBs (OVN_Northbound, OVN_Southbound) should be configured in NB DB, table NB_Global, column options:ic_probe_interval. IDL to global DBs (OVN_IC_Northbound, OVN_IC_Southbound) should be configured in IC NB DB, table IC_NB_Global, column options:ic_probe_interval. Signed-off-by: Vladislav Odintsov <odivlad@gmail.com> --- ic/ovn-ic.c | 28 ++++++++++++++++++++++++++++ ovn-ic-nb.xml | 14 ++++++++++++++ ovn-nb.xml | 13 +++++++++++++ 3 files changed, 55 insertions(+)