[ovs-dev] [PATCH] ovn-ctl: Add "--no-leader-only" while cluster db init

Tao YunXiang taoyunxiang at cmss.chinamobile.com
Mon Mar 9 10:49:39 UTC 2020

For cluster mode, only the first server(which is the leader) in a cluster
should do init. But, sometimes, the role of the first server would transfer
leadership, so we should add "--no-leader-only" option in case 
the ovn-northd stucked.

Author: Tao YunXiang <taoyunxiang at cmss.chinamobile.com>
Co-authored-by: Liu Chang <liuchang at cmss.chinamobile.com>
Signed-off-by: Tao YunXiang <taoyunxiang at cmss.chinamobile.com>
Signed-off-by: Liu Chang <liuchang at cmss.chinamobile.com>

 utilities/ovn-ctl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
index 2a337ae27..71bdbc076 100755
--- a/utilities/ovn-ctl
+++ b/utilities/ovn-ctl
@@ -293,7 +293,7 @@ $cluster_remote_port
     # Initialize the database if it's running standalone,
     # active-passive, or is the first server in a cluster.
     if test -z "$cluster_remote_addr"; then
-        $(echo ovn-${db}ctl | tr _ -) init
+        $(echo ovn-${db}ctl | tr _ -) --no-leader-only init
     if test $mode = cluster; then

More information about the dev mailing list