Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ovs-sandbox for docker run #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions tutorial/ovs-sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -271,28 +271,30 @@ trap 'kill `cat "$sandbox"/*.pid`' 0 1 2 3 13 14 15
touch "$sandbox"/.conf.db.~lock~
run ovsdb-tool create conf.db "$schema"
ovsdb_server_args=
socket_file="/tmp/sandbox/db.sock"
mkdir -p /tmp/sandbox
rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file -vsyslog:off \
--remote=punix:"$sandbox"/db.sock \
--remote=punix:"$socket_file" \
--remote=db:Open_vSwitch,Open_vSwitch,manager_options \
$ovsdb_server_args

#Add a small delay to allow ovsdb-server to launch.
sleep 0.1

#Wait for ovsdb-server to finish launching.
if test ! -e "$sandbox"/db.sock; then
if test ! -e "$socket_file"; then
printf "Waiting for ovsdb-server to start..."
while test ! -e "$sandbox"/db.sock; do
while test ! -e "$socket_file"; do
sleep 1;
done
echo " Done"
fi

# Initialize database.
run ovs-vsctl --no-wait -- init
run ovs-vsctl --db=unix:$socket_file --no-wait -- init

# Start ovs-vswitchd.
rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file -vsyslog:off \
rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --no-chdir --pidfile -vconsole:off --log-file -vsyslog:off \
--enable-dummy=$dummy -vvconn -vnetdev_dummy

cat <<EOF
Expand Down
Loading