On 8/19/21 2:17 PM, Renat Nurgaliyev wrote: > Setting probe interval before calling Reconnect.enable() ensures > that initial OVSDB connection will not use the default probe interval > of 5000 ms, as it may cause connection problems to large databases. > > Signed-off-by: Renat Nurgaliyev <imple...@gmail.com>
Hmm. But why exactly order in this function matters? I didn't look close enough, but IIRC here we're only setting the configuration. We're not opening the actual connection here and probe interval should only be used inside the run() or wait() functions of jsonrpc. Could you, please, explain the problem in more details? Best regards, Ilya Maximets. > --- > python/ovs/jsonrpc.py | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/python/ovs/jsonrpc.py b/python/ovs/jsonrpc.py > index d5127268a..c60133369 100644 > --- a/python/ovs/jsonrpc.py > +++ b/python/ovs/jsonrpc.py > @@ -408,16 +408,17 @@ class Session(object): > reconnect = ovs.reconnect.Reconnect(ovs.timeval.msec()) > session = Session(reconnect, None, remotes) > session.pick_remote() > - reconnect.enable(ovs.timeval.msec()) > - reconnect.set_backoff_free_tries(len(remotes)) > - if ovs.stream.PassiveStream.is_valid_name(reconnect.get_name()): > - reconnect.set_passive(True, ovs.timeval.msec()) > > if not > ovs.stream.stream_or_pstream_needs_probes(reconnect.get_name()): > reconnect.set_probe_interval(0) > elif probe_interval is not None: > reconnect.set_probe_interval(probe_interval) > > + reconnect.enable(ovs.timeval.msec()) > + reconnect.set_backoff_free_tries(len(remotes)) > + if ovs.stream.PassiveStream.is_valid_name(reconnect.get_name()): > + reconnect.set_passive(True, ovs.timeval.msec()) > + > return session > > @staticmethod > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev