Skip to content

Commit

Permalink
ovs-sandbox: Convert initial databases if needed.
Browse files Browse the repository at this point in the history
The --nbdb-source and --sbdb-source options allow users to point the
sandbox daemons to already existing database files.  It's useful if
these are first converted to use the currently supported schema.

Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
  • Loading branch information
dceara authored and numansiddique committed Feb 10, 2022
1 parent f167c0b commit 0a6bd0d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tutorial/ovs-sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,11 @@ ovn_start_db() {
case $model in
standalone)
case $source_type in
database) run cp "$source" ${db}1.db ;;
database)
run cp "$source" ${db}1.db
run ovsdb-tool convert ${db}1.db \
$srcdir/ovn-${db}.ovsschema
;;
schema) run ovsdb-tool create ${db}1.db "$source" ;;
esac
ovn_start_ovsdb_server 1
Expand All @@ -551,7 +555,11 @@ ovn_start_db() {
backup)
for i in 1 2; do
case $source_type in
database) run cp "$source" $db$i.db ;;
database)
run cp "$source" $db$i.db
run ovsdb-tool convert $db$i.db \
$srcdir/ovn-${db}.ovsschema
;;
schema) run ovsdb-tool create $db$i.db "$source" ;;
esac
done
Expand Down

0 comments on commit 0a6bd0d

Please sign in to comment.