On 12/4/23 12:23, Felix Huettner via dev wrote:
> This exposes the old constants regarding min backoff, max backoff and
> probe interval using environment variables. In case previously users
> wanted to tune the probe interval for all connections this required
> setting this setting in multiple locations. E.g. to configure the probe
> interval from a relay to the ovsdb server you need to call an appctl
> command after the relay has started up.
> The new environment variables make it easy to set them for all new
> connections. The existing configuration options for these settings stay
> in place and take precedence over the environment variables.
> In case the environment variables are not specified/invalid formatted we
> default to the previous defaults.
> 
> Signed-off-by: Felix Huettner <felix.huettner@mail.schwarz>
> ---
> v3->v4: fix conflict in NEWS file
> v2->v3: add minimal values and defaults as defines
> v1->v2: fixed wrong function definitions
> 
>  NEWS                    |  7 +++++
>  lib/jsonrpc.c           |  4 +--
>  lib/reconnect.c         | 70 +++++++++++++++++++++++++++++++++++++----
>  lib/reconnect.h         |  7 ++---
>  ovsdb/jsonrpc-server.c  |  4 +--
>  ovsdb/ovsdb-server.c    |  2 +-
>  ovsdb/relay.h           |  2 --
>  python/ovs/reconnect.py | 45 ++++++++++++++++++++++++--
>  8 files changed, 121 insertions(+), 20 deletions(-)
> 
> diff --git a/NEWS b/NEWS
> index 490e275da..6b580edf3 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -19,6 +19,13 @@ Post-v3.2.0
>       * Added support for Generic Segmentation Offloading for the cases where
>         TSO is enabled but not supported by an egress interface (except for
>         tunnel interfaces).
> +   - The environment variable OVS_RECONNECT_MIN_BACKOFF,
> +     OVS_RECONNECT_MAX_BACKOFF and OVS_RECONNECT_PROBE_INTERVAL, if set, 
> allow
> +     users to tune the default reconnect configuration. E.g. adapting
> +     OVS_RECONNECT_PROBE_INTERVAL modifies the default probe interval, for 
> all
> +     servers and clients. These variables are valid for all ovs code as well 
> as
> +     the python client. Values set for individual connections (e.g. using the
> +     `inactivity_probe` column in the `Manager` tables) will take precedence.

Hi, Felix.  Thanks for the patch!  Though I'm not sure if introduction
of yet another way of setting the same thing is a good approach for
this problem.  If anything, we should probably try to reduce the number
of configuration methods.  I tried to come up with a way to solve the
configuration for ovsdb-server for a long time now, and the config file
approach that I've been working for a past few months seems promising:
  
https://patchwork.ozlabs.org/project/openvswitch/patch/20231214010431.1664005-21-i.maxim...@ovn.org/
At least it should reduce the configuration method variety while the
config file is in use.  And it should solve the problem of configuring
relays that you mentioned in the commit message.

Having a configurable global default may also be confusing for the end
users.  Primarily because it doesn't actually apply to everything.
For example, active-backup replication has its own default probe interval
that will not be affected, and RAFT is calculating probe interval based
on election timer.  So, it may be not clear why the variable is set,
nothing is explicitly configured by the user, but some connections are
not using the value.
Another potential source of confusion is that OpenFlow connections use
the same terminology (probe_interval), but a different implementation
that is not going to be affected by this change as well.

Is there a scenario that we still need to cover that will not be covered
by the configuration file?  If there are some, we could try to come
up with solutions for these.  I know of a few, but these are just bugs
that should be fixed and this patch will not help with them anyway.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to