# Create database and start ovsdb-server.
touch "$sandbox"/.conf.db.~lock~
run ovsdb-tool create conf.db "$schema"
+ovsdb_server_args=
+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 ovnnb.db "$ovnnb_schema"
+ ovsdb_server_args="ovnsb.db ovnnb.db conf.db"
+fi
rungdb $gdb_ovsdb ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
- --remote=punix:"$sandbox"/db.sock
+ --remote=punix:"$sandbox"/db.sock $ovsdb_server_args
+ # Initialize database.
+ run ovs-vsctl --no-wait -- init
+
# Start ovs-vswitchd.
rungdb $gdb_vswitchd ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
--enable-dummy=override -vvconn -vnetdev_dummy