Add support for managing IC-NB and IC-SB DBs, and ovn-ic daemon.

Signed-off-by: Han Zhou <hz...@ovn.org>
---
 utilities/ovn-ctl       | 362 +++++++++++++++++++++++++++++++++++++++++++++++-
 utilities/ovn-ctl.8.xml |  91 ++++++++++++
 2 files changed, 452 insertions(+), 1 deletion(-)

diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl
index 2e4e773..f8d23a3 100755
--- a/utilities/ovn-ctl
+++ b/utilities/ovn-ctl
@@ -33,6 +33,9 @@ done
 ovnnb_active_conf_file="$ovn_etcdir/ovnnb-active.conf"
 ovnsb_active_conf_file="$ovn_etcdir/ovnsb-active.conf"
 ovn_northd_db_conf_file="$ovn_etcdir/ovn-northd-db-params.conf"
+ovninb_active_conf_file="$ovn_etcdir/ovninb-active.conf"
+ovnisb_active_conf_file="$ovn_etcdir/ovnisb-active.conf"
+ovn_ic_db_conf_file="$ovn_etcdir/ovn-ic-db-params.conf"
 ## ----- ##
 ## start ##
 ## ----- ##
@@ -61,6 +64,19 @@ stop_ovsdb () {
     stop_sb_ovsdb
 }
 
+stop_inb_ovsdb() {
+    stop_xx_ovsdb $DB_INB_PID ovninb_db.ctl
+}
+
+stop_isb_ovsdb() {
+    stop_xx_ovsdb $DB_ISB_PID ovnisb_db.ctl
+}
+
+stop_ic_ovsdb () {
+    stop_inb_ovsdb
+    stop_isb_ovsdb
+}
+
 demote_xx_ovsdb () {
     local sync_from_addr=$1
     local sync_from_proto=$2
@@ -91,6 +107,16 @@ demote_ovnsb() {
                     $DB_SB_SYNC_FROM_PORT $ovnsb_active_conf_file ovnsb_db.ctl
 }
 
+demote_ovninb() {
+    demote_xx_ovsdb $DB_INB_SYNC_FROM_ADDR $DB_INB_SYNC_FROM_PROTO \
+                    $DB_INB_SYNC_FROM_PORT $ovninb_active_conf_file 
ovninb_db.ctl
+}
+
+demote_ovnisb() {
+    demote_xx_ovsdb $DB_ISB_SYNC_FROM_ADDR $DB_ISB_SYNC_FROM_PROTO \
+                    $DB_ISB_SYNC_FROM_PORT $ovnisb_active_conf_file 
ovnisb_db.ctl
+}
+
 promote_xx_ovsdb() {
     local active_conf_file=$1
     local ctl_file=$2
@@ -106,6 +132,14 @@ promote_ovnsb() {
     promote_xx_ovsdb $ovnsb_active_conf_file ovnsb_db.ctl
 }
 
+promote_ovninb() {
+    promote_xx_ovsdb $ovninb_active_conf_file ovninb_db.ctl
+}
+
+promote_ovnisb() {
+    promote_xx_ovsdb $ovnisb_active_conf_file ovnisb_db.ctl
+}
+
 start_ovsdb__() {
     local DB=$1 db=$2 schema_name=$3 table_name=$4
     local db_pid_file
@@ -284,6 +318,19 @@ start_ovsdb () {
     start_sb_ovsdb
 }
 
+start_inb_ovsdb() {
+    start_ovsdb__ INB inb OVN_IC_Northbound INB_Global
+}
+
+start_isb_ovsdb() {
+    start_ovsdb__ ISB isb OVN_IC_Southbound ISB_Global
+}
+
+start_ic_ovsdb () {
+    start_inb_ovsdb
+    start_isb_ovsdb
+}
+
 sync_status() {
     ovn-appctl -t $OVN_RUNDIR/ovn${1}_db.ctl ovsdb-server/sync-status | awk 
'{if(NR==1) print $2}'
 }
@@ -318,6 +365,36 @@ status_ovsdb () {
   fi
 }
 
+status_ovninb() {
+    if ! pidfile_is_running $DB_INB_PID; then
+        echo "not-running"
+    else
+        echo "running/$(sync_status inb)"
+    fi
+}
+
+status_ovnisb() {
+    if ! pidfile_is_running $DB_ISB_PID; then
+        echo "not-running"
+    else
+        echo "running/$(sync_status isb)"
+    fi
+}
+
+status_ic_ovsdb () {
+  if ! pidfile_is_running $DB_INB_PID; then
+      log_success_msg "OVN IC-Northbound DB is not running"
+  else
+      log_success_msg "OVN IC-Northbound DB is running"
+  fi
+
+  if ! pidfile_is_running $DB_ISB_PID; then
+      log_success_msg "OVN IC-Southbound DB is not running"
+  else
+      log_success_msg "OVN IC-Southbound DB is running"
+  fi
+}
+
 run_nb_ovsdb() {
     DB_NB_DETACH=no
     start_nb_ovsdb
@@ -328,6 +405,16 @@ run_sb_ovsdb() {
     start_sb_ovsdb
 }
 
+run_inb_ovsdb() {
+    DB_INB_DETACH=no
+    start_inb_ovsdb
+}
+
+run_isb_ovsdb() {
+    DB_ISB_DETACH=no
+    start_isb_ovsdb
+}
+
 start_northd () {
     if [ ! -e $ovn_northd_db_conf_file ]; then
         if test X"$OVN_MANAGE_OVSDB" = Xyes; then
@@ -373,6 +460,41 @@ start_northd () {
     fi
 }
 
+start_ic () {
+    if [ ! -e $ovn_ic_db_conf_file ]; then
+        ovn_ic_params="--ovnnb-db=$OVN_NORTHD_NB_DB \
+                       --ovnsb-db=$OVN_NORTHD_SB_DB \
+                       --ovninb-db=$OVN_IC_NB_DB \
+                       --ovnisb-db=$OVN_IC_SB_DB"
+    else
+        ovn_ic_params="`cat $ovn_ic_db_conf_file`"
+    fi
+
+    if daemon_is_running ovn-ic; then
+        log_success_msg "ovn-ic is already running"
+    else
+        set ovn-ic
+        if test X"$OVN_IC_LOGFILE" != X; then
+            set "$@" --log-file=$OVN_IC_LOGFILE
+        fi
+        if test X"$OVN_IC_SSL_KEY" != X; then
+            set "$@" --private-key=$OVN_IC_SSL_KEY
+        fi
+        if test X"$OVN_IC_SSL_CERT" != X; then
+            set "$@" --certificate=$OVN_IC_SSL_CERT
+        fi
+        if test X"$OVN_IC_SSL_CA_CERT" != X; then
+            set "$@" --ca-cert=$OVN_IC_SSL_CA_CERT
+        fi
+
+        [ "$OVN_USER" != "" ] && set "$@" --user "$OVN_USER"
+
+        set "$@" $OVN_IC_LOG $ovn_ic_params
+
+        OVS_RUNDIR=${OVS_RUNDIR} start_ovn_daemon "$OVN_IC_PRIORITY" 
"$OVN_IC_WRAPPER" "$@"
+    fi
+}
+
 start_controller () {
     set ovn-controller "unix:$DB_SOCK"
     set "$@" $OVN_CONTROLLER_LOG
@@ -435,6 +557,10 @@ stop_northd () {
     fi
 }
 
+stop_ic () {
+    OVS_RUNDIR=${OVS_RUNDIR} stop_ovn_daemon ovn-ic
+}
+
 stop_controller () {
     OVS_RUNDIR=${OVS_RUNDIR} stop_ovn_daemon ovn-controller "$@"
 }
@@ -452,6 +578,11 @@ restart_northd () {
     start_northd
 }
 
+restart_ic () {
+    stop_ic
+    start_ic
+}
+
 restart_controller () {
     stop_controller --restart
     start_controller
@@ -477,6 +608,21 @@ restart_sb_ovsdb () {
     start_sb_ovsdb
 }
 
+restart_ic_ovsdb () {
+    stop_ic_ovsdb
+    start_ic_ovsdb
+}
+
+restart_inb_ovsdb () {
+    stop_inb_ovsdb
+    start_inb_ovsdb
+}
+
+restart_isb_ovsdb () {
+    stop_isb_ovsdb
+    start_isb_ovsdb
+}
+
 ## ---- ##
 ## main ##
 ## ---- ##
@@ -507,14 +653,38 @@ set_defaults () {
     DB_SB_SYNC_FROM_ADDR=
     DB_SB_SYNC_FROM_PORT=6642
 
+    DB_INB_SOCK=$OVN_RUNDIR/ovninb_db.sock
+    DB_INB_PID=$OVN_RUNDIR/ovninb_db.pid
+    DB_INB_CTRL_SOCK=$OVN_RUNDIR/ovninb_db.ctl
+    DB_INB_FILE=$ovn_dbdir/ovninb_db.db
+    DB_INB_ADDR=0.0.0.0
+    DB_INB_PORT=6645
+    DB_INB_SYNC_FROM_PROTO=tcp
+    DB_INB_SYNC_FROM_ADDR=
+    DB_INB_SYNC_FROM_PORT=6645
+
+    DB_ISB_SOCK=$OVN_RUNDIR/ovnisb_db.sock
+    DB_ISB_PID=$OVN_RUNDIR/ovnisb_db.pid
+    DB_ISB_CTRL_SOCK=$OVN_RUNDIR/ovnisb_db.ctl
+    DB_ISB_FILE=$ovn_dbdir/ovnisb_db.db
+    DB_ISB_ADDR=0.0.0.0
+    DB_ISB_PORT=6646
+    DB_ISB_SYNC_FROM_PROTO=tcp
+    DB_ISB_SYNC_FROM_ADDR=
+    DB_ISB_SYNC_FROM_PORT=6646
+
     DB_NB_SCHEMA=$ovn_datadir/ovn-nb.ovsschema
     DB_SB_SCHEMA=$ovn_datadir/ovn-sb.ovsschema
+    DB_INB_SCHEMA=$ovn_datadir/ovn-inb.ovsschema
+    DB_ISB_SCHEMA=$ovn_datadir/ovn-isb.ovsschema
 
     DB_SOCK=$OVS_RUNDIR/db.sock
     DB_CONF_FILE=$dbdir/conf.db
 
     OVN_NORTHD_PRIORITY=-10
     OVN_NORTHD_WRAPPER=
+    OVN_IC_PRIORITY=-10
+    OVN_IC_WRAPPER=
     OVN_CONTROLLER_PRIORITY=-10
     OVN_CONTROLLER_WRAPPER=
 
@@ -523,10 +693,16 @@ set_defaults () {
     OVN_CONTROLLER_LOG="-vconsole:emer -vsyslog:err -vfile:info"
     OVN_NORTHD_LOG="-vconsole:emer -vsyslog:err -vfile:info"
     OVN_NORTHD_LOGFILE=""
+    OVN_IC_LOG="-vconsole:emer -vsyslog:err -vfile:info"
+    OVN_IC_LOGFILE=""
     OVN_NB_LOG="-vconsole:off -vfile:info"
     OVN_SB_LOG="-vconsole:off -vfile:info"
     OVN_NB_LOGFILE="$ovn_logdir/ovsdb-server-nb.log"
     OVN_SB_LOGFILE="$ovn_logdir/ovsdb-server-sb.log"
+    OVN_INB_LOG="-vconsole:off -vfile:info"
+    OVN_ISB_LOG="-vconsole:off -vfile:info"
+    OVN_INB_LOGFILE="$ovn_logdir/ovsdb-server-inb.log"
+    OVN_ISB_LOGFILE="$ovn_logdir/ovsdb-server-isb.log"
 
     OVN_CONTROLLER_SSL_KEY=""
     OVN_CONTROLLER_SSL_CERT=""
@@ -537,14 +713,24 @@ set_defaults () {
     OVN_NORTHD_SSL_CERT=""
     OVN_NORTHD_SSL_CA_CERT=""
 
+    OVN_IC_SSL_KEY=""
+    OVN_IC_SSL_CERT=""
+    OVN_IC_SSL_CA_CERT=""
+
     DB_SB_CREATE_INSECURE_REMOTE="no"
     DB_NB_CREATE_INSECURE_REMOTE="no"
 
+    DB_ISB_CREATE_INSECURE_REMOTE="no"
+    DB_INB_CREATE_INSECURE_REMOTE="no"
+
     MONITOR="yes"
 
     DB_NB_DETACH="yes"
     DB_SB_DETACH="yes"
 
+    DB_INB_DETACH="yes"
+    DB_ISB_DETACH="yes"
+
     DB_NB_CLUSTER_LOCAL_ADDR=""
     DB_NB_CLUSTER_LOCAL_PROTO="tcp"
     DB_NB_CLUSTER_LOCAL_PORT=6643
@@ -559,11 +745,30 @@ set_defaults () {
     DB_SB_CLUSTER_REMOTE_PROTO="tcp"
     DB_SB_CLUSTER_REMOTE_PORT=6644
 
+    DB_INB_CLUSTER_LOCAL_ADDR=""
+    DB_INB_CLUSTER_LOCAL_PROTO="tcp"
+    DB_INB_CLUSTER_LOCAL_PORT=6647
+    DB_INB_CLUSTER_REMOTE_ADDR=""
+    DB_INB_CLUSTER_REMOTE_PROTO="tcp"
+    DB_INB_CLUSTER_REMOTE_PORT=6647
+
+    DB_ISB_CLUSTER_LOCAL_ADDR=""
+    DB_ISB_CLUSTER_LOCAL_PROTO="tcp"
+    DB_ISB_CLUSTER_LOCAL_PORT=6648
+    DB_ISB_CLUSTER_REMOTE_ADDR=""
+    DB_ISB_CLUSTER_REMOTE_PROTO="tcp"
+    DB_ISB_CLUSTER_REMOTE_PORT=6648
+
     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"
 
+    OVN_IC_INB_DB="unix:$DB_INB_SOCK"
+    OVN_IC_ISB_DB="unix:$DB_ISB_SOCK"
+    DB_INB_USE_REMOTE_IN_DB="yes"
+    DB_ISB_USE_REMOTE_IN_DB="yes"
+
     OVN_NB_DB_SSL_KEY=""
     OVN_NB_DB_SSL_CERT=""
     OVN_NB_DB_SSL_CA_CERT=""
@@ -572,6 +777,14 @@ set_defaults () {
     OVN_SB_DB_SSL_CERT=""
     OVN_SB_DB_SSL_CA_CERT=""
 
+    OVN_INB_DB_SSL_KEY=""
+    OVN_INB_DB_SSL_CERT=""
+    OVN_INB_DB_SSL_CA_CERT=""
+
+    OVN_ISB_DB_SSL_KEY=""
+    OVN_ISB_DB_SSL_CERT=""
+    OVN_ISB_DB_SSL_CA_CERT=""
+
 }
 
 set_option () {
@@ -601,22 +814,36 @@ Commands:
   start_ovsdb                 start ovn related ovsdb-server processes
   start_nb_ovsdb              start ovn northbound db ovsdb-server process
   start_sb_ovsdb              start ovn southbound db ovsdb-server process
+  start_ic                    start ovn-ic
+  start_ic_ovsdb              start ovn interconnection ovsdb-server processes
+  start_inb_ovsdb             start ovn ic-northbound db ovsdb-server process
+  start_isb_ovsdb             start ovn ic-southbound db ovsdb-server process
   start_controller            start ovn-controller
   start_controller_vtep       start ovn-controller-vtep
   stop_northd                 stop ovn-northd
   stop_ovsdb                  stop ovn related ovsdb-server processes
   stop_nb_ovsdb               stop ovn northbound db ovsdb-server process
   stop_sb_ovsdb               stop ovn southbound db ovsdb-server process
+  stop_ic                     stop ovn-ic
+  stop_ic_ovsdb               stop ovn interconnection ovsdb-server processes
+  stop_inb_ovsdb              stop ovn ic-northbound db ovsdb-server process
+  stop_isb_ovsdb              stop ovn ic-southbound db ovsdb-server process
   stop_controller             stop ovn-controller
   stop_controller_vtep        stop ovn-controller-vtep
   restart_northd              restart ovn-northd
   restart_ovsdb               restart ovn related ovsdb-server processes
   restart_nb_ovsdb            restart ovn northbound db ovsdb-server process
   restart_sb_ovsdb            restart ovn southbound db ovsdb-server process
+  restart_ic                  restart ovn-ic
+  restart_ic_ovsdb            restart ovn interconnection ovsdb-server 
processes
+  restart_inb_ovsdb           restart ovn ic-northbound db ovsdb-server process
+  restart_isb_ovsdb           restart ovn ic-southbound db ovsdb-server process
   restart_controller          restart ovn-controller
   restart_controller_vtep     restart ovn-controller-vtep
   status_northd               status ovs-northd
   status_ovsdb                status related ovsdb-server processes
+  status_ic                   status ovn-ic
+  status_ic_ovsdb             status ovn interconnection ovsdb-server processes
   status_controller           status ovn-controller
   status_controller_vtep      status ovn-controller-vtep
   promote_ovnnb               promote ovn northbound db backup server to active
@@ -625,6 +852,12 @@ Commands:
   demote_ovnsb                demote ovn southbound db active server to backup
   run_nb_ovsdb                run ovn northbound db ovsdb-server process
   run_sb_ovsdb                run ovn southbound db ovsdb-server process
+  promote_ovninb               promote ovn ic-northbound db backup server to 
active
+  promote_ovnisb               promote ovn ic-southbound db backup server to 
active
+  demote_ovninb                demote ovn ic-northbound db active server to 
backup
+  demote_ovnisb                demote ovn ic-southbound db active server to 
backup
+  run_inb_ovsdb                run ovn ic-northbound db ovsdb-server process
+  run_isb_ovsdb                run ovn ic-southbound db ovsdb-server process
 
 Options:
   --ovn-northd-priority=NICE     set ovn-northd's niceness (default: 
$OVN_NORTHD_PRIORITY)
@@ -644,7 +877,7 @@ Options:
   --ovn-northd-ssl-key=KEY OVN Northd SSL private key file
   --ovn-northd-ssl-cert=CERT OVN Northd SSL certificate file
   --ovn-northd-ssl-ca-cert=CERT OVN Northd SSL CA certificate file
-  --ovn-manage-ovsdb=yes|no        Whether or not the OVN databases should be
+  --ovn-manage-ovsdb=yes|no        Whether or not the OVN NB/SB databases 
should be
                                    automatically started and stopped along
                                    with ovn-northd. The default is "yes". If
                                    this is set to "no", the "start_ovsdb" and
@@ -655,6 +888,19 @@ Options:
   --ovn-northd-logfile=STRING        ovn northd process log file (default: 
$OVN_NORTHD_LOGFILE)
   --ovn-nb-log=STRING             ovn NB ovsdb-server processes logging params 
(default: $OVN_NB_LOG)
   --ovn-sb-log=STRING             ovn SB ovsdb-server processes logging params 
(default: $OVN_SB_LOG)
+  --ovn-ic-priority=NICE     set ovn-ic's niceness (default: $OVN_IC_PRIORITY)
+  --ovn-ic-wrapper=WRAPPER   run with a wrapper like valgrind for debugging
+  --ovn-ic-ssl-key=KEY OVN IC SSL private key file
+  --ovn-ic-ssl-cert=CERT OVN IC SSL certificate file
+  --ovn-ic-ssl-ca-cert=CERT OVN IC SSL CA certificate file
+  --ovn-ic-log=STRING            ovn-ic process logging params (default: 
$OVN_IC_LOG)
+  --ovn-ic-logfile=STRING        ovn-ic process log file (default: 
$OVN_IC_LOGFILE)
+  --ovn-inb-db-ssl-key=KEY OVN IC Northbound DB SSL private key file
+  --ovn-inb-db-ssl-cert=CERT OVN IC Northbound DB SSL certificate file
+  --ovn-inb-db-ssl-ca-cert=CERT OVN IC Northbound DB SSL CA certificate file
+  --ovn-isb-db-ssl-key=KEY OVN IC Southbound DB SSL private key file
+  --ovn-isb-db-ssl-cert=CERT OVN IC Southbound DB SSL certificate file
+  --ovn-isb-db-ssl-ca-cert=CERT OVN IC Southbound DB SSL CA certificate file
   --ovn-user="user[:group]"      pass the --user flag to the ovn daemons
   --ovs-user="user[:group]"      pass the --user flag to ovs daemons
   -h, --help                     display this help message
@@ -709,6 +955,54 @@ File location options:
   --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)
+  --db-inb-sock=SOCKET  OVN_IC_Northbound db socket (default: $DB_INB_SOCK)
+  --db-isb-scok=SOCKET  OVN_IC_Southbound db socket (default: $DB_ISB_SOCK)
+  --db-inb-file=FILE    OVN_IC_Northbound db file (default: $DB_INB_FILE)
+  --db-isb-file=FILE    OVN_IC_Southbound db file (default: $DB_ISB_FILE)
+  --db-inb-schema=FILE  OVN_IC_Northbound db file (default: $DB_INB_SCHEMA)
+  --db-isb-schema=FILE  OVN_IC_Southbound db file (default: $DB_ISB_SCHEMA)
+  --db-inb-addr=ADDR    OVN IC Northbound db ptcp address (default: 
$DB_INB_ADDR)
+  --db-inb-port=PORT    OVN IC Northbound db ptcp port (default: $DB_INB_PORT)
+  --db-isb-addr=ADDR    OVN IC Southbound db ptcp address (default: 
$DB_ISB_ADDR)
+  --db-isb-port=PORT    OVN IC Southbound db ptcp port (default: $DB_ISB_PORT)
+  --ovn-inb-logfile=FILE OVN IC Northbound log file (default: $OVN_INB_LOGFILE)
+  --ovn-isb-logfile=FILE OVN IC Southbound log file (default: $OVN_ISB_LOGFILE)
+  --db-inb-sync-from-addr=ADDR OVN IC Northbound active db tcp address 
(default: $DB_INB_SYNC_FROM_ADDR)
+  --db-inb-sync-from-port=PORT OVN IC Northbound active db tcp port (default: 
$DB_INB_SYNC_FROM_PORT)
+  --db-inb-sync-from-proto=PROTO OVN IC Northbound active db transport 
(default: $DB_INB_SYNC_FROM_PROTO)
+  --db-inb-create-insecure-remote=yes|no Create ptcp OVN IC Northbound remote 
(default: $DB_INB_CREATE_INSECURE_REMOTE)
+  --db-isb-sync-from-addr=ADDR OVN IC Southbound active db tcp address 
(default: $DB_ISB_SYNC_FROM_ADDR)
+  --db-isb-sync-from-port=ADDR OVN IC Southbound active db tcp port (default: 
$DB_ISB_SYNC_FROM_PORT)
+  --db-isb-sync-from-proto=PROTO OVN IC Southbound active db transport 
(default: $DB_ISB_SYNC_FROM_PROTO)
+  --db-isb-create-insecure-remote=yes|no Create ptcp OVN IC Southbound remote 
(default: $DB_ISB_CREATE_INSECURE_REMOTE)
+  --db-inb-cluster-local-addr=ADDR OVN_IC_Northbound cluster local address \
+  (default: $DB_INB_CLUSTER_LOCAL_ADDR)
+  --db-inb-cluster-local-port=PORT OVN_IC_Northbound cluster local tcp port \
+  (default: $DB_INB_CLUSTER_LOCAL_PORT)
+  --db-inb-cluster-local-proto=PROTO OVN_IC_Northbound cluster local db 
transport \
+  (default: $DB_INB_CLUSTER_LOCAL_PROTO)
+  --db-inb-cluster-remote-addr=ADDR OVN_IC_Northbound cluster remote address \
+  (default: $DB_INB_CLUSTER_REMOTE_ADDR)
+  --db-inb-cluster-remote-port=PORT OVN_IC_Northbound cluster remote tcp port \
+  (default: $DB_INB_CLUSTER_REMOTE_PORT)
+  --db-inb-cluster-remote-proto=PROTO OVN_IC_Northbound cluster remote db \
+  transport (default: $DB_INB_CLUSTER_REMOTE_PROTO)
+  --db-isb-cluster-local-addr=ADDR OVN_IC_Southbound cluster local address \
+  (default: $DB_ISB_CLUSTER_LOCAL_ADDR)
+  --db-isb-cluster-local-port=PORT OVN_IC_Southbound cluster local tcp port \
+  (default: $DB_ISB_CLUSTER_LOCAL_PORT)
+  --db-isb-cluster-local-proto=PROTO OVN_IC_Southbound cluster local db 
transport \
+  (default: $DB_ISB_CLUSTER_LOCAL_PROTO)
+  --db-isb-cluster-remote-addr=ADDR OVN_IC_Southbound cluster remote address \
+  (default: $DB_ISB_CLUSTER_REMOTE_ADDR)
+  --db-isb-cluster-remote-port=PORT OVN_IC_Southbound cluster remote tcp port \
+  (default: $DB_ISB_CLUSTER_REMOTE_PORT)
+  --db-isb-cluster-remote-proto=PROTO OVN_IC_Southbound cluster remote db \
+  transport (default: $DB_ISB_CLUSTER_REMOTE_PROTO)
+  --ovn-ic-inb-db=INB DB address(es) (default: $OVN_IC_INB_DB)
+  --ovn-ic-isb-db=ISB DB address(es) (default: $OVN_IC_ISB_DB)
+  --db-inb-use-remote-in-db=yes|no OVN_IC_Northbound db listen on target 
connection table (default: $DB_INB_USE_REMOTE_IN_DB)
+  --db-isb-use-remote-in-db=yes|no OVN_IC_Southbound db listen on target 
connection table (default: $DB_ISB_USE_REMOTE_IN_DB)
 
 Default directories with "configure" option and environment variable override:
   logs: /usr/local/var/log/ovn (--with-logdir, OVN_LOGDIR)
@@ -781,6 +1075,18 @@ case $command in
     start_controller_vtep)
         start_controller_vtep
         ;;
+    start_ic)
+        start_ic
+        ;;
+    start_ic_ovsdb)
+        start_ic_ovsdb
+        ;;
+    start_inb_ovsdb)
+        start_inb_ovsdb
+        ;;
+    start_isb_ovsdb)
+        start_isb_ovsdb
+        ;;
     stop_northd)
         stop_northd
         ;;
@@ -799,6 +1105,18 @@ case $command in
     stop_controller_vtep)
         stop_controller_vtep
         ;;
+    stop_ic)
+        stop_ic
+        ;;
+    stop_ic_ovsdb)
+        stop_ic_ovsdb
+        ;;
+    stop_inb_ovsdb)
+        stop_inb_ovsdb
+        ;;
+    stop_isb_ovsdb)
+        stop_isb_ovsdb
+        ;;
     restart_northd)
         restart_northd
         ;;
@@ -817,6 +1135,18 @@ case $command in
     restart_controller_vtep)
         restart_controller_vtep
         ;;
+    restart_ic)
+        restart_ic
+        ;;
+    restart_ic_ovsdb)
+        restart_ic_ovsdb
+        ;;
+    restart_inb_ovsdb)
+        restart_inb_ovsdb
+        ;;
+    restart_isb_ovsdb)
+        restart_isb_ovsdb
+        ;;
     status_northd)
         daemon_status ovn-northd || exit 1
         ;;
@@ -829,6 +1159,12 @@ case $command in
     status_controller_vtep)
         daemon_status ovn-controller-vtep || exit 1
         ;;
+    status_ic)
+        daemon_status ovn-ic || exit 1
+        ;;
+    status_ic_ovsdb)
+        status_ic_ovsdb
+        ;;
     promote_ovnnb)
         promote_ovnnb
         ;;
@@ -847,12 +1183,36 @@ case $command in
     status_ovnsb)
         status_ovnsb
         ;;
+    promote_ovninb)
+        promote_ovninb
+        ;;
+    promote_ovnisb)
+        promote_ovnisb
+        ;;
+    demote_ovninb)
+        demote_ovninb
+        ;;
+    demote_ovnisb)
+        demote_ovnisb
+        ;;
+    status_ovninb)
+        status_ovninb
+        ;;
+    status_ovnisb)
+        status_ovnisb
+        ;;
     run_nb_ovsdb)
         run_nb_ovsdb
         ;;
     run_sb_ovsdb)
         run_sb_ovsdb
         ;;
+    run_inb_ovsdb)
+        run_inb_ovsdb
+        ;;
+    run_isb_ovsdb)
+        run_isb_ovsdb
+        ;;
     help)
         usage
         ;;
diff --git a/utilities/ovn-ctl.8.xml b/utilities/ovn-ctl.8.xml
index f70bd6f..44373fd 100644
--- a/utilities/ovn-ctl.8.xml
+++ b/utilities/ovn-ctl.8.xml
@@ -16,12 +16,15 @@
       <dt><code>start_northd</code></dt>
       <dt><code>start_controller</code></dt>
       <dt><code>start_controller_vtep</code></dt>
+      <dt><code>start_ic</code></dt>
       <dt><code>stop_northd</code></dt>
       <dt><code>stop_controller</code></dt>
       <dt><code>stop_controller_vtep</code></dt>
+      <dt><code>stop_ic</code></dt>
       <dt><code>restart_northd</code></dt>
       <dt><code>restart_controller</code></dt>
       <dt><code>restart_controller_vtep</code></dt>
+      <dt><code>restart_ic</code></dt>
       <dt><code>promote_ovnnb</code></dt>
       <dt><code>promote_ovnsb</code></dt>
       <dt><code>demote_ovnnb</code></dt>
@@ -37,6 +40,21 @@
       <dt><code>restart_ovsdb</code></dt>
       <dt><code>run_nb_ovsdb</code></dt>
       <dt><code>run_sb_ovsdb</code></dt>
+      <dt><code>promote_ovninb</code></dt>
+      <dt><code>promote_ovnisb</code></dt>
+      <dt><code>demote_ovninb</code></dt>
+      <dt><code>demote_ovnisb</code></dt>
+      <dt><code>status_ovninb</code></dt>
+      <dt><code>status_ovnisb</code></dt>
+      <dt><code>start_ic_ovsdb</code></dt>
+      <dt><code>start_inb_ovsdb</code></dt>
+      <dt><code>start_isb_ovsdb</code></dt>
+      <dt><code>stop_ic_ovsdb</code></dt>
+      <dt><code>stop_inb_ovsdb</code></dt>
+      <dt><code>stop_isb_ovsdb</code></dt>
+      <dt><code>restart_ic_ovsdb</code></dt>
+      <dt><code>run_inb_ovsdb</code></dt>
+      <dt><code>run_isb_ovsdb</code></dt>
     </dl>
 
     <h1>Options</h1>
@@ -44,6 +62,8 @@
     <p><code>--ovn-northd-wrapper=<var>WRAPPER</var></code></p>
     <p><code>--ovn-controller-priority=<var>NICE</var></code></p>
     <p><code>--ovn-controller-wrapper=<var>WRAPPER</var></code></p>
+    <p><code>--ovn-ic-priority=<var>NICE</var></code></p>
+    <p><code>--ovn-ic-wrapper=<var>WRAPPER</var></code></p>
     <p><code>--ovn-user=<var>USER:GROUP</var></code></p>
     <p><code>--ovs-user=<var>USER:GROUP</var></code></p>
     <p><code>-h</code> | <code>--help</code></p>
@@ -56,6 +76,12 @@
     <p><code>--db-sb-schema=<var>FILE</var></code></p>
     <p><code>--db-sb-create-insecure-remote=<var>yes|no</var></code></p>
     <p><code>--db-nb-create-insecure-remote=<var>yes|no</var></code></p>
+    <p><code>--db-inb-file=<var>FILE</var></code></p>
+    <p><code>--db-isb-file=<var>FILE</var></code></p>
+    <p><code>--db-inb-schema=<var>FILE</var></code></p>
+    <p><code>--db-isb-schema=<var>FILE</var></code></p>
+    <p><code>--db-isb-create-insecure-remote=<var>yes|no</var></code></p>
+    <p><code>--db-inb-create-insecure-remote=<var>yes|no</var></code></p>
     <p><code>--ovn-controller-ssl-key=<var>KEY</var></code></p>
     <p><code>--ovn-controller-ssl-cert=<var>CERT</var></code></p>
     <p><code>--ovn-controller-ssl-ca-cert=<var>CERT</var></code></p>
@@ -68,6 +94,12 @@
     <p><code>--db-sb-sync-from-addr=<var>IP ADDRESS</var></code></p>
     <p><code>--db-sb-sync-from-port=<var>PORT NUMBER</var></code></p>
     <p><code>--db-sb-sync-from-proto=<var>PROTO</var></code></p>
+    <p><code>--db-inb-sync-from-addr=<var>IP ADDRESS</var></code></p>
+    <p><code>--db-inb-sync-from-port=<var>PORT NUMBER</var></code></p>
+    <p><code>--db-inb-sync-from-proto=<var>PROTO</var></code></p>
+    <p><code>--db-isb-sync-from-addr=<var>IP ADDRESS</var></code></p>
+    <p><code>--db-isb-sync-from-port=<var>PORT NUMBER</var></code></p>
+    <p><code>--db-isb-sync-from-proto=<var>PROTO</var></code></p>
     <p>
       <code>
         --ovn-northd-nb-db=<var>PROTO</var>:<var>IP ADDRESS</var>:
@@ -80,6 +112,18 @@
         <var>PORT</var>..
       </code>
     </p>
+    <p>
+      <code>
+        --ovn-ic-inb-db=<var>PROTO</var>:<var>IP ADDRESS</var>:
+        <var>PORT</var>..
+      </code>
+    </p>
+    <p>
+      <code>
+        --ovn-ic-isb-db=<var>PROTO</var>:<var>IP ADDRESS</var>:
+        <var>PORT</var>..
+      </code>
+    </p>
     <h1> Clustering options </h1>
     <p><code>--db-nb-cluster-local-addr=<var>IP ADDRESS</var></code></p>
     <p><code>--db-nb-cluster-local-port=<var>PORT NUMBER</var></code></p>
@@ -93,6 +137,18 @@
     <p><code>--db-sb-cluster-remote-addr=<var>IP ADDRESS</var></code></p>
     <p><code>--db-sb-cluster-remote-port=<var>PORT NUMBER</var></code></p>
     <p><code>--db-sb-cluster-remote-proto=<var>PROTO (tcp/ssl)</var></code></p>
+    <p><code>--db-inb-cluster-local-addr=<var>IP ADDRESS</var></code></p>
+    <p><code>--db-inb-cluster-local-port=<var>PORT NUMBER</var></code></p>
+    <p><code>--db-inb-cluster-local-proto=<var>PROTO (tcp/ssl)</var></code></p>
+    <p><code>--db-inb-cluster-remote-addr=<var>IP ADDRESS</var></code></p>
+    <p><code>--db-inb-cluster-remote-port=<var>PORT NUMBER</var></code></p>
+    <p><code>--db-inb-cluster-remote-proto=<var>PROTO 
(tcp/ssl)</var></code></p>
+    <p><code>--db-isb-cluster-local-addr=<var>IP ADDRESS</var></code></p>
+    <p><code>--db-isb-cluster-local-port=<var>PORT NUMBER</var></code></p>
+    <p><code>--db-isb-cluster-local-proto=<var>PROTO (tcp/ssl)</var></code></p>
+    <p><code>--db-isb-cluster-remote-addr=<var>IP ADDRESS</var></code></p>
+    <p><code>--db-isb-cluster-remote-port=<var>PORT NUMBER</var></code></p>
+    <p><code>--db-isb-cluster-remote-proto=<var>PROTO 
(tcp/ssl)</var></code></p>
 
     <h1>Configuration files</h1>
     <p>Following are the optional configuration files. If present, it should 
be located in the etc dir</p>
@@ -119,6 +175,27 @@
     </p>
     <p><code>--ovnnb-db=tcp:x.x.x.x:6641 --ovnsb-db=tcp:x.x.x.x:6642</code></p>
 
+    <h2>ovninb-active.conf</h2>
+    <p>
+    If present, this file should hold the url to connect to the active
+    Interconnection Northbound DB server
+    </p>
+    <p><code>tcp:x.x.x.x:6645</code></p>
+
+    <h2>ovnisb-active.conf</h2>
+    <p>
+    If present, this file should hold the url to connect to the active
+    Interconnection Southbound DB server
+    </p>
+    <p><code>tcp:x.x.x.x:6646</code></p>
+
+    <h2>ovn-ic-db-params.conf</h2>
+    <p>
+    If present, this file should hold the database url parameters to be passed
+    to ovn-ic.
+    </p>
+    <p><code>--ovninb-db=tcp:x.x.x.x:6645 
--ovnisb-db=tcp:x.x.x.x:6646</code></p>
+
     <h1> Running OVN db servers without detaching </h1>
     <p><code># ovn-ctl run_nb_ovsdb</code></p>
     <p>
@@ -134,6 +211,20 @@
       This command will be useful for starting the OVN sb ovsdb-server in a
       container.
     </p>
+    <p><code># ovn-ctl run_inb_ovsdb</code></p>
+    <p>
+      This command runs the OVN IC-NB ovsdb-server without passing the
+      <code>detach</code> option, making it to block until ovsdb-server exits.
+      This command will be useful for starting the OVN IC-NB ovsdb-server in a
+      container.
+    </p>
+    <p><code># ovn-ctl run_isb_ovsdb</code></p>
+    <p>
+      This command runs the OVN IC-SB ovsdb-server without passing the
+      <code>detach</code> option, making it to block until ovsdb-server exits.
+      This command will be useful for starting the OVN IC-SB ovsdb-server in a
+      container.
+    </p>
 
     <h1>Example Usage</h1>
     <h2>Run ovn-controller on a host already running OVS</h2>
-- 
2.1.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to