2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 01:51:26 +00:00

ovs-sandbox: Add option to support multiple ovn-controllers.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
This commit is contained in:
Ben Pfaff 2018-05-25 14:24:18 -07:00
parent ea38b8931a
commit 047458de40

View File

@ -72,6 +72,7 @@ ovnsb_schema=
ovnnb_schema=
ovn_rbac=true
n_northds=1
n_controllers=1
nbdb_model=standalone
nbdb_servers=3
sbdb_model=backup
@ -212,6 +213,12 @@ EOF
--n-northd*)
prev=n_northds
;;
--n-controller*=*)
n_controllers=$optarg
;;
--n-controller*)
prev=n_controllers
;;
--nbdb-s*=*)
nbdb_servers=$optarg
nbdb_model=clustered
@ -386,7 +393,9 @@ if $ovn; then
$OVS_PKI -B 1024 init
$OVS_PKI -B 1024 req+sign ovnsb switch
$OVS_PKI -B 1024 req+sign ovnnb switch
$OVS_PKI -B 1024 -u req+sign chassis-1 switch
for i in $(seq $n_controllers); do
$OVS_PKI -B 1024 -u req+sign chassis-$i switch
done
fi
fi
rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
@ -524,8 +533,11 @@ if $ovn; then
--log-file=ovn-northd$i.log \
--ovnsb-db="$OVN_SB_DB" --ovnnb-db="$OVN_NB_DB"
done
rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \
$OVN_CTRLR_PKI --detach --no-chdir --pidfile -vconsole:off --log-file
for i in $(seq $n_controllers); do
rungdb $gdb_ovn_controller $gdb_ovn_controller_ex ovn-controller \
$OVN_CTRLR_PKI --detach --no-chdir \
--pidfile=ovn-controller$i.pid -vconsole:off --log-file
done
rungdb $gdb_ovn_controller_vtep $gdb_ovn_controller_vtep_ex \
ovn-controller-vtep --detach --no-chdir --pidfile -vconsole:off \
$OVN_CTRLR_PKI --log-file --ovnsb-db=unix:"$sandbox"/ovnsb_db.sock