diff mbox series

[ovs-dev] northd: Don't poll ovsdb before the connection is fully established

Message ID CAGMx_ARLRKeNsZxhspgfsw5+AkTY_gS6e3Yw3d1XikJ4Oy6Edg@mail.gmail.com
State Changes Requested
Headers show
Series [ovs-dev] northd: Don't poll ovsdb before the connection is fully established | expand

Commit Message

Renat Nurgaliyev Nov. 5, 2020, 5:03 p.m. UTC
From: Renat Nurgaliyev <impleman@gmail.com>

Before the value configured in northd_probe_interval can be actually
applied, connection to both northbound and southbound databases must be
established. In big scale environments, the southbound database can be so
big that northd cannot establish connection in 5 seconds, before the
connection is killed by an unreplied probe. This causes endless
reconnection, and northd can never stabilize. This patch makes sure that
probes are initially disabled on connections to northbound and southbound
databases, so that northd can take its time to establish connections
properly. After we can "reach" the northd_probe_interval option set in
northbound DB, it is applied to both connections, or
DEFAULT_PROBE_INTERVAL_MSEC is used if nothing is set by the user.

Signed-off-by: Renat Nurgaliyev <impleman@gmail.com>
---
 northd/ovn-northd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

dev mailing list
dev@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Comments

Numan Siddique Nov. 9, 2020, 9:02 a.m. UTC | #1
On Thu, Nov 5, 2020 at 10:34 PM Renat Nurgaliyev <impleman@gmail.com> wrote:
>
> From: Renat Nurgaliyev <impleman@gmail.com>
>
> Before the value configured in northd_probe_interval can be actually
> applied, connection to both northbound and southbound databases must be
> established. In big scale environments, the southbound database can be so
> big that northd cannot establish connection in 5 seconds, before the
> connection is killed by an unreplied probe. This causes endless
> reconnection, and northd can never stabilize. This patch makes sure that
> probes are initially disabled on connections to northbound and southbound
> databases, so that northd can take its time to establish connections
> properly. After we can "reach" the northd_probe_interval option set in
> northbound DB, it is applied to both connections, or
> DEFAULT_PROBE_INTERVAL_MSEC is used if nothing is set by the user.
>
> Signed-off-by: Renat Nurgaliyev <impleman@gmail.com>

Hi Renat,

Thanks for the patch. There seems to be some issue with the way this
patch is sent.
If you see here -
https://patchwork.ozlabs.org/project/ovn/patch/CAGMx_ARLRKeNsZxhspgfsw5+AkTY_gS6e3Yw3d1XikJ4Oy6Edg@mail.gmail.com/

after your signed-off tag, there are below stray lines because of
which the patch doesn't apply cleanly with "git am".

---
dev mailing list
dev@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev
---

Please take a look into that.

The patch overall looks good to me. However the below test case fails
with your patch -

261: ovn-controller-vtep - binding 1                 FAILED (wait-until)

Can you please take a look.

I noticed that when ovn-northd is paused - (ovn-appctl -t ovn-northd
pause) and later if the user changes the probe interval
value, it's not updated. This issue exists even before this patch. If
you want you could address this issue too ?

Thanks
Numan


> ---
>  northd/ovn-northd.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
> index 684c2bd47..073c6a0f3 100644
> --- a/northd/ovn-northd.c
> +++ b/northd/ovn-northd.c
> @@ -100,8 +100,8 @@ static struct eth_addr svc_monitor_mac_ea;
>
>  /* Default probe interval for NB and SB DB connections. */
>  #define DEFAULT_PROBE_INTERVAL_MSEC 5000
> -static int northd_probe_interval_nb = DEFAULT_PROBE_INTERVAL_MSEC;
> -static int northd_probe_interval_sb = DEFAULT_PROBE_INTERVAL_MSEC;
> +static int northd_probe_interval_nb = 0;
> +static int northd_probe_interval_sb = 0;
>
>  #define MAX_OVN_TAGS 4096
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
diff mbox series

Patch

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index 684c2bd47..073c6a0f3 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -100,8 +100,8 @@  static struct eth_addr svc_monitor_mac_ea;

 /* Default probe interval for NB and SB DB connections. */
 #define DEFAULT_PROBE_INTERVAL_MSEC 5000
-static int northd_probe_interval_nb = DEFAULT_PROBE_INTERVAL_MSEC;
-static int northd_probe_interval_sb = DEFAULT_PROBE_INTERVAL_MSEC;
+static int northd_probe_interval_nb = 0;
+static int northd_probe_interval_sb = 0;

 #define MAX_OVN_TAGS 4096
_______________________________________________