diff options
author | Andy Zhou <azhou@ovn.org> | 2016-08-09 15:35:46 -0700 |
---|---|---|
committer | Andy Zhou <azhou@ovn.org> | 2016-08-15 13:58:33 -0700 |
commit | 9ec131827ebe11a3bd4cb7c2ca12559e319c7e87 (patch) | |
tree | c1b9fb960cade1b91639bcdbe10b7decbc47a5b2 /tutorial | |
parent | c3d062a777466ed108aa4a1ce65c63e8990f83ea (diff) | |
download | openvswitch-9ec131827ebe11a3bd4cb7c2ca12559e319c7e87.tar.gz |
sandbox: launch SB backup server when running in OVN mode
Automatically launch backup server for OVN SB database that replicates
all transactions of the active server. This can be handy for
experimenting with the newly added replication feature.
Signed-off-by: Andy Zhou <azhou@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'tutorial')
-rw-r--r-- | tutorial/OVN-Tutorial.md | 11 | ||||
-rwxr-xr-x | tutorial/ovs-sandbox | 15 |
2 files changed, 23 insertions, 3 deletions
diff --git a/tutorial/OVN-Tutorial.md b/tutorial/OVN-Tutorial.md index a1fff0bba..be9805cee 100644 --- a/tutorial/OVN-Tutorial.md +++ b/tutorial/OVN-Tutorial.md @@ -25,12 +25,17 @@ environment: 1. Creates the `OVN_Northbound` and `OVN_Southbound` databases as described in [ovn-nb(5)] and [ovn-sb(5)]. - 2. Creates the `hardware_vtep` database as described in [vtep(5)]. + 2. Creates a backup server for `OVN_Southbond` database. Sandbox launch + screen provides the instructions on accessing the backup database. + However access to the backup server is not required to go through the + tutorial. - 3. Runs the [ovn-northd(8)], [ovn-controller(8)], and [ovn-controller-vtep(8)] + 3. Creates the `hardware_vtep` database as described in [vtep(5)]. + + 4. Runs the [ovn-northd(8)], [ovn-controller(8)], and [ovn-controller-vtep(8)] daemons. - 4. Makes OVN and VTEP utilities available for use in the environment, + 5. Makes OVN and VTEP utilities available for use in the environment, including [vtep-ctl(8)], [ovn-nbctl(8)], and [ovn-sbctl(8)]. Note that each of these demos assumes you start with a fresh sandbox diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox index 69c2c689d..6f03eded6 100755 --- a/tutorial/ovs-sandbox +++ b/tutorial/ovs-sandbox @@ -316,10 +316,12 @@ if $ovn; then touch "$sandbox"/.ovnsb.db.~lock~ touch "$sandbox"/.ovnnb.db.~lock~ run ovsdb-tool create ovnsb.db "$ovnsb_schema" + run ovsdb-tool create ovnsb2.db "$ovnsb_schema" run ovsdb-tool create ovnnb.db "$ovnnb_schema" run ovsdb-tool create vtep.db "$vtep_schema" ovsdb_server_args="vtep.db conf.db" ovsdb_sb_server_args="ovnsb.db" + ovsdb_sb_backup_server_args="ovnsb2.db" ovsdb_nb_server_args="ovnnb.db" fi rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \ @@ -333,6 +335,13 @@ if $ovn; then --pidfile="$sandbox"/ovnsb_db.pid -vconsole:off \ --log-file="$sandbox"/ovnsb_db.log \ --remote=punix:"$sandbox"/ovnsb_db.sock $ovsdb_sb_server_args + # Start SB back up server + rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir \ + --pidfile="$sandbox"/ovnsb_db2.pid -vconsole:off \ + --log-file="$sandbox"/ovnsb_db2.log \ + --remote=punix:"$sandbox"/ovnsb_db2.sock \ + --unixctl="$sandbox"/sb_backup_unixctl \ + --sync-from=unix:"$sandbox"/ovnsb_db.sock $ovsdb_sb_backup_server_args fi #Add a small delay to allow ovsdb-server to launch. @@ -389,6 +398,12 @@ if $ovn; then cat << EOF This environment also has the OVN daemons and databases enabled. You can use ovn-nbctl and ovn-sbctl to interact with the OVN databases. +The backup server of OVN SB can be accessed by: +* ovn-sbctl --db=unix:`pwd`/sandbox/ovnsb_db2.sock +* ovs-appctl -t `pwd`/sandbox/sb_backup_unixctl +The backup database file is "sandbox"/ovnsb2.db + + EOF fi cat <<EOF |