Acked-by: Mark Michelson <mmich...@redhat.com>
Since this is a new feature introduced after soft freeze for 22.06, this
shouldn't be a candidate for 22.06. However, personally I feel this is
so low-risk (and so useful) that it should be included. Does anyone
disagree?
On 5/17/22 06:47, Dumitru Ceara wrote:
This makes it easier to troubleshoot OVN in a sandbox when initial
contents for the NB/SB/OVS DBs are provided (e.g., from a production
environment).
A way to load the DBs locally and run OVN against them is:
$ SANDBOXFLAGS="--nbdb-source=path-to-nb.db --sbdb-source=path-to-sb.db
--ovs-source=path-to-conf.db" make sandbox
Signed-off-by: Dumitru Ceara <dce...@redhat.com>
---
tutorial/ovs-sandbox | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index d81e00496..2219b0e99 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
@@ -79,6 +79,8 @@ ovn_rbac=true
n_northds=1
n_ics=1
n_controllers=1
+ovs_source=
+vtep_source=
nbdb_model=standalone
nbdb_servers=3
nbdb_source=
@@ -307,6 +309,18 @@ EOF
--sbdb-so*)
prev=ovnsb_source
;;
+ --ovs-so*=*)
+ ovs_source=$optarg
+ ;;
+ --ovs-so*)
+ prev=ovs_source
+ ;;
+ --vtep-so*=*)
+ vtep_source=$optarg
+ ;;
+ --vtep-so*)
+ prev=vtep_source
+ ;;
--ic-nb-s*=*)
ic_nb_servers=$optarg
ic_nb_model=clustered
@@ -474,10 +488,20 @@ trap 'kill `cat "$sandbox"/*.pid`' 0 1 2 3 13 14 15
# Create database and start ovsdb-server.
touch "$sandbox"/.conf.db.~lock~
-run ovsdb-tool create conf.db "$schema"
+if test ! -e "$ovs_source"; then
+ run ovsdb-tool create conf.db "$schema"
+else
+ run cp "$ovs_source" conf.db
+ run ovsdb-tool convert conf.db "$schema"
+fi
ovsdb_server_args=
-run ovsdb-tool create vtep.db "$vtep_schema"
+if test ! -e "$vtep_source"; then
+ run ovsdb-tool create vtep.db "$vtep_schema"
+else
+ run cp "$vtep_source" vtep.db
+ run ovsdb-tool convert vtep.db "$vtep_schema"
+fi
ovsdb_server_args="vtep.db conf.db"
if [ "$HAVE_OPENSSL" = yes ]; then
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev