Skip to content

Commit

Permalink
ovn-ctl: Support NB and SB DBs to start without using remote connecti…
Browse files Browse the repository at this point in the history
…ons.

e.g --remote=db:OVN_Southbound,SB_Global,connections and
    --remote=db:OVN_Northbound,NB_Global,connections

can be skipped for cases where slaves do not need to listen on nb and sb db
connection tables while using pacemaker with load balancer for ovndb clusters.

Signed-off-by: aginwala <[email protected]>
Acked-by: Han Zhou <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
aginwala authored and blp committed Jul 5, 2018
1 parent 165c1f0 commit 9885e3b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ovn/utilities/ovn-ctl
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ start_ovsdb__() {
local port
local addr
local active_conf_file
local use_remote_in_db
eval pid=\$DB_${DB}_PID
eval cluster_local_addr=\$DB_${DB}_CLUSTER_LOCAL_ADDR
eval cluster_local_port=\$DB_${DB}_CLUSTER_LOCAL_PORT
Expand All @@ -135,6 +136,7 @@ start_ovsdb__() {
eval port=\$DB_${DB}_PORT
eval addr=\$DB_${DB}_ADDR
eval active_conf_file=\$ovn${db}_active_conf_file
eval use_remote_in_db=\$DB_${DB}_USE_REMOTE_IN_DB

# Check and eventually start ovsdb-server for DB
if pidfile_is_running $pid; then
Expand Down Expand Up @@ -176,7 +178,9 @@ $cluster_remote_port
set exec "$@"
fi

set "$@" --remote=db:$schema_name,$table_name,connections
if test X"$use_remote_in_db" != Xno; then
set "$@" --remote=db:$schema_name,$table_name,connections
fi
set "$@" --private-key=db:$schema_name,SSL,private_key
set "$@" --certificate=db:$schema_name,SSL,certificate
set "$@" --ca-cert=db:$schema_name,SSL,ca_cert
Expand Down Expand Up @@ -463,6 +467,8 @@ set_defaults () {

OVN_NORTHD_NB_DB="unix:$DB_NB_SOCK"
OVN_NORTHD_SB_DB="unix:$DB_SB_SOCK"
DB_NB_USE_REMOTE_IN_DB="yes"
DB_SB_USE_REMOTE_IN_DB="yes"
}

set_option () {
Expand Down Expand Up @@ -577,6 +583,8 @@ File location options:
transport (default: $DB_SB_CLUSTER_REMOTE_PROTO)
--ovn-northd-nb-db=NB DB address(es) (default: $OVN_NORTHD_NB_DB)
--ovn-northd-sb-db=SB DB address(es) (default: $OVN_NORTHD_SB_DB)
--db-nb-use-remote-in-db=yes|no OVN_Northbound db listen on target connection table (default: $DB_NB_USE_REMOTE_IN_DB)
--db-sb-use-remote-in-db=yes|no OVN_Southbound db listen on target connection table (default: $DB_SB_USE_REMOTE_IN_DB)
Default directories with "configure" option and environment variable override:
logs: /usr/local/var/log/openvswitch (--with-logdir, OVS_LOGDIR)
Expand Down

0 comments on commit 9885e3b

Please sign in to comment.