summaryrefslogtreecommitdiff
path: root/tutorial
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2015-03-25 22:25:50 -0700
committerBen Pfaff <blp@nicira.com>2015-03-27 08:38:27 -0700
commit6b2771c347547b835cf425878d1d3e636631b1d5 (patch)
tree0ffd9493d4cbbc0f75680754f7ebab1402320f10 /tutorial
parentc876a4bb9bcc881befac5647a1e311b5af09d549 (diff)
downloadopenvswitch-6b2771c347547b835cf425878d1d3e636631b1d5.tar.gz
ovs-sandbox: Initialize database before starting ovs-vswitchd.
Otherwise ovs-vswitchd can't immediately start working (until some other call to ovs-vsctl initializes the database). This is most obvious if one runs "ovs-vsctl list Open_vSwitch ." as the first command, because the output will not show the changes that ovs-vswitchd will make to the database at startup (in particular initializing datapath_types and iface_types), which is confusing. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Russell Bryant <rbryant@redhat.com>
Diffstat (limited to 'tutorial')
-rwxr-xr-xtutorial/ovs-sandbox5
1 files changed, 4 insertions, 1 deletions
diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox
index 1504ea9f8..9520a41c4 100755
--- a/tutorial/ovs-sandbox
+++ b/tutorial/ovs-sandbox
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (c) 2013 Nicira, Inc.
+# Copyright (c) 2013, 2015 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -235,6 +235,9 @@ run ovsdb-tool create conf.db "$schema"
rungdb $gdb_ovsdb ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
--remote=punix:"$sandbox"/db.sock
+# 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