From: Numan Siddique <[email protected]>

When pacemaker script, starts the ovsdb-servers in all the nodes,
it doesn't pass the --db-(n/s)b-addr=MASTER_IP option.
When pacemaker promotes a master, it won't be listening on the
master ip address unless "ovn-nbctl set-connection" is used.

In this patch this option, along with --db-(n/s)b-create-insecure-remote=yes
for "tcp" connection types is passed when starting the OVN ovsdb-servers
to overcome this issue.

Signed-off-by: Numan Siddique <[email protected]>
---
 ovn/utilities/ovndb-servers.ocf | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ovn/utilities/ovndb-servers.ocf b/ovn/utilities/ovndb-servers.ocf
index ad4b155..908cb3c 100755
--- a/ovn/utilities/ovndb-servers.ocf
+++ b/ovn/utilities/ovndb-servers.ocf
@@ -238,6 +238,17 @@ ovsdb_server_start() {
 
     set ${OVN_CTL}
 
+    set $@ --db-nb-addr=${MASTER_IP} --db-nb-port=${NB_MASTER_PORT}
+    set $@ --db-sb-addr=${MASTER_IP} --db-sb-port=${SB_MASTER_PORT}
+
+    if [ "x${NB_MASTER_PROTO}" = xtcp ]; then
+        set $@ --db-nb-create-insecure-remote=yes
+    fi
+
+    if [ "x${SB_MASTER_PROTO}" = xtcp ]; then
+        set $@ --db-sb-create-insecure-remote=yes
+    fi
+
     if [ "x${present_master}" = x ]; then
         # No master detected, or the previous master is not among the
         # set starting.
-- 
2.9.3

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to