summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuman Siddique <nusiddiq@redhat.com>2017-02-22 20:28:36 +0530
committerAndy Zhou <azhou@ovn.org>2017-02-22 13:02:27 -0800
commitfe3520d727654f866ff19026273c47c846750c73 (patch)
treed3e2e825ec25b4fe178508e27e23da21ae2e348c
parentfb55a74c2573db2feae0fa0226f1b6c0dca88697 (diff)
downloadopenvswitch-fe3520d727654f866ff19026273c47c846750c73.tar.gz
ovn pacemaker: Pass --db-(n/s)b-addr option when starting ovsdb-servers
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 <nusiddiq@redhat.com> Signed-off-by: Andy Zhou <azhou@ovn.org>
-rwxr-xr-xovn/utilities/ovndb-servers.ocf11
1 files changed, 11 insertions, 0 deletions
diff --git a/ovn/utilities/ovndb-servers.ocf b/ovn/utilities/ovndb-servers.ocf
index ad4b1551c..908cb3c17 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.