|
|
ebb439 |
From 64592da65e3cf28d0d3d81caf664e841093cd22d Mon Sep 17 00:00:00 2001
|
|
|
ebb439 |
From: Renat Nurgaliyev <impleman@gmail.com>
|
|
|
ebb439 |
Date: Tue, 10 Nov 2020 15:23:37 +0100
|
|
|
ebb439 |
Subject: [PATCH] northd: Don't poll ovsdb before the connection is fully
|
|
|
ebb439 |
established
|
|
|
ebb439 |
|
|
|
ebb439 |
Set initial SB and NB DBs probe interval to 0 to avoid connection
|
|
|
ebb439 |
flapping.
|
|
|
ebb439 |
|
|
|
ebb439 |
Before configured in northd_probe_interval value is actually applied
|
|
|
ebb439 |
to southbound and northbound database connections, both connections
|
|
|
ebb439 |
must be fully established, otherwise ovnnb_db_run() will return
|
|
|
ebb439 |
without retrieving configuration data from northbound DB. In cases
|
|
|
ebb439 |
when southbound database is big enough, default interval of 5 seconds
|
|
|
ebb439 |
will kill and retry the connection before it is fully established, no
|
|
|
ebb439 |
matter what is set in northd_probe_interval. Client reconnect will
|
|
|
ebb439 |
cause even more load to ovsdb-server and cause cascade effect, so
|
|
|
ebb439 |
northd can never stabilise. We have more than 2000 ports in our lab,
|
|
|
ebb439 |
and northd could not start before this patch, holding at 100% CPU
|
|
|
ebb439 |
utilisation both itself and ovsdb-server.
|
|
|
ebb439 |
|
|
|
ebb439 |
After connections are established, any value in northd_probe_interval,
|
|
|
ebb439 |
or default DEFAULT_PROBE_INTERVAL_MSEC is applied correctly.
|
|
|
ebb439 |
|
|
|
ebb439 |
Signed-off-by: Renat Nurgaliyev <impleman@gmail.com>
|
|
|
ebb439 |
Signed-off-by: Numan Siddique <numans@ovn.org>
|
|
|
ebb439 |
|
|
|
ebb439 |
(cherry-picked from master commit 1e59feea933610b28fd4442243162ce35595cfee)
|
|
|
ebb439 |
---
|
|
|
ebb439 |
northd/ovn-northd.c | 4 ++--
|
|
|
ebb439 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
ebb439 |
|
|
|
ebb439 |
diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
|
|
|
ebb439 |
index ce291ecb0..a158a73a7 100644
|
|
|
ebb439 |
--- a/northd/ovn-northd.c
|
|
|
ebb439 |
+++ b/northd/ovn-northd.c
|
|
|
ebb439 |
@@ -100,8 +100,8 @@ static struct eth_addr svc_monitor_mac_ea;
|
|
|
ebb439 |
|
|
|
ebb439 |
/* Default probe interval for NB and SB DB connections. */
|
|
|
ebb439 |
#define DEFAULT_PROBE_INTERVAL_MSEC 5000
|
|
|
ebb439 |
-static int northd_probe_interval_nb = DEFAULT_PROBE_INTERVAL_MSEC;
|
|
|
ebb439 |
-static int northd_probe_interval_sb = DEFAULT_PROBE_INTERVAL_MSEC;
|
|
|
ebb439 |
+static int northd_probe_interval_nb = 0;
|
|
|
ebb439 |
+static int northd_probe_interval_sb = 0;
|
|
|
ebb439 |
|
|
|
ebb439 |
#define MAX_OVN_TAGS 4096
|
|
|
ebb439 |
|
|
|
ebb439 |
--
|
|
|
ebb439 |
2.28.0
|
|
|
ebb439 |
|