summaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2018-05-25 14:24:18 -0700
committerBen Pfaff <blp@ovn.org>2018-05-25 14:25:46 -0700
commit047458de403912a78f9aa711495fa2d9a0329cf0 (patch)
treea6de03320aa3ee27a371a97409208dc4870bea7c /tutorial
parentea38b8931a5bd59834c4f96a4fb68ffcc05fb6c3 (diff)
downloadopenvswitch-047458de403912a78f9aa711495fa2d9a0329cf0.tar.gz
ovs-sandbox: Add option to support multiple ovn-controllers.
Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
Diffstat (limited to 'tutorial')
-rwxr-xr-xtutorial/ovs-sandbox18
1 files changed, 15 insertions, 3 deletions
diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index 9505c6c3d..64b485ac1 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
@@ -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