When running ovsdb-server under gdb, there is a race that ovs-vsctl command can be called before ovsdb-server is fully launched. This will cause ovs-vsctl to fail. This patch fixes this by delay issuing the ovs-vsctl command until ovsdb-server is fully launched.
CC: Russell Bryant <rbry...@redhat.com> Signed-off-by: Andy Zhou <az...@nicira.com> --- tutorial/ovs-sandbox | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tutorial/ovs-sandbox b/tutorial/ovs-sandbox index 251f021..4a0b014 100755 --- a/tutorial/ovs-sandbox +++ b/tutorial/ovs-sandbox @@ -235,6 +235,14 @@ 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 +if test ! -e "$sandbox"/db.sock; then + echo -n "Waiting for ovsdb-server to start..." + while test ! -e "$sandbox"/db.sock; do + sleep 0; + done + echo " Done" +fi + # Initialize database. run ovs-vsctl --no-wait -- init -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev