On Thu, Jan 20, 2022 at 8:54 AM Ilya Maximets <i.maxim...@ovn.org> wrote:
>
> On 1/20/22 14:13, Wentao Jia wrote:
> >
> >
> > 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。
>
> I understand that.  But,
> "not set" should be equal to "set to default 5 seconds".
> I'm not sure why we need to call ovsdb_idl_set_probe_interval
> explicitly if the default 5 seconds should already be configured.
> That is my question.
>
> We should not need to call ovsdb_idl_set_probe_interval to
> have 5 second inactivity probe interval.  So, I'm trying to
> understand why this is needed in your case.

I missed this completely.  Thanks Ilya for pointing this out.
I kind of assumed the probe interval was set to 0.

@Wentao Jia  Can you please check what is the default value set in your case.

Numan

>
> The only reason I can think of is the unix: connection method
> that may not have inactivity probe enabled by default.  But
> unix sockets are typically good at detecting broken connections.
>
> Best regards, Ilya Maximets.
>
> >
> > 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 <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

Reply via email to