Hi, Ilya


Initially, ovndb-ctl command is a program executed only once,probe interval is 
not be set。
ovndb-ctl daemon mode is a longrun program,so we need to set probe interval。

Best regards, Wentao Jia >>> >>> ovndb-ctl deamon mode, the connection cannot 
be reconnected when >>> connection is broken, set inactivity probe interval to 
make it >>> reconnected > >Hi, Wentao, Numan. > >Could you, please, elaborate, 
why exactly connection can not be >reconnected? AFAICT, 
ovsdb_idl_set_probe_interval() only updates >the fsm->probe_interval that 
should already be equal to 5 seconds >by default 
(RECONNECT_DEFAULT_PROBE_INTERVAL). >So, why do we need to set it from the 
application code? Am I missing >something? > >Best regards, Ilya Maximets. > 
>>> >>> >>> Signed-off-by: Wentao Jia <[email protected]> >> >> 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
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to