Skip to content

Commit

Permalink
ovs-sandbox: Initialize database before starting ovs-vswitchd.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Russell Bryant <[email protected]>
  • Loading branch information
blp committed Mar 27, 2015
1 parent c876a4b commit 6b2771c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tutorial/ovs-sandbox
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6b2771c

Please sign in to comment.