On Thu, Jan 6, 2022 at 11:02 PM Wentao Jia <wentao....@easystack.cn> wrote: > > > ovndb-ctl deamon mode, the connection cannot be reconnected when > connection is broken, set inactivity probe interval to make it > reconnected > > > Signed-off-by: Wentao Jia <wentao....@easystack.cn>
Thanks for the patch. I see one issue with using the default probe interval value of 5 seconds. If the database is huge, 5 seconds may not be enough and the dbctl daemons/utilities could be in infinite loop connecting/disconnecting due to the probe interval time out. Instead, I'd suggest adding a command line option so that users can specify the probe interval value to use (with the default value set to 0 if not specified). Like ovn-nbctl --probe-interval=10000 ... Thanks Numan > --- > utilities/ovn-dbctl.c | 4 ++++ > 1 file changed, 4 insertions(+) > > > diff --git a/utilities/ovn-dbctl.c b/utilities/ovn-dbctl.c > index 791caabb2..2080e8ba0 100644 > --- a/utilities/ovn-dbctl.c > +++ b/utilities/ovn-dbctl.c > @@ -109,6 +109,9 @@ static void server_loop(const struct ovn_dbctl_options > *dbctl_options, > struct ovsdb_idl *idl, int argc, char *argv[]); > static void ovn_dbctl_exit(int status); > > +/* Default probe interval for NB and SB DB connections. */ > +#define DEFAULT_PROBE_INTERVAL_MSEC 5000 > + > int > ovn_dbctl_main(int argc, char *argv[], > const struct ovn_dbctl_options *dbctl_options) > @@ -191,6 +194,7 @@ ovn_dbctl_main(int argc, char *argv[], > /* "retry" is true iff in daemon mode. */ > ovsdb_idl_set_remote(idl, db, daemon_mode); > ovsdb_idl_set_leader_only(idl, leader_only); > + ovsdb_idl_set_probe_interval(idl, DEFAULT_PROBE_INTERVAL_MSEC); > > if (daemon_mode) { > server_loop(dbctl_options, idl, argc, argv_); > -- > 2.32.0 > > > > > > > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev