Make ovs-vswitchd report when it is done configuring; make ovs-vsctl wait.
authorBen Pfaff <blp@nicira.com>
Thu, 17 Dec 2009 00:26:17 +0000 (16:26 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 17 Dec 2009 00:26:17 +0000 (16:26 -0800)
commitb54e22e91eee43eb04ad53e2fa919be44f34e731
tree5e08313135b3cb46de1e5ec9596450a2fbf0a172
parent722f63016f302da114e3afb145bd0c1af5aaeb8f
Make ovs-vswitchd report when it is done configuring; make ovs-vsctl wait.

Until now the ovsdb-based vswitch has provided no way to know when it has
finished applying the configuration from the database.  This commit
introduces a way:

  * The client who wants to wait increments the "next_cfg" column of the
    Open_vSwitch record.

  * When ovs-vswitchd finishes reconfiguring, it sets the value of the
    "cur_cfg" column to that of the "next_cfg" column.

  * The client waits until the "cur_cfg" column is at least as great as
    the value it set into "next_cfg".

This allows us to drop the 5-second sleep in interface-reconfigure.
lib/ovsdb-idl.c
lib/ovsdb-idl.h
tests/ovs-vsctl.at
tests/ovsdb-idl.at
tests/test-ovsdb.c
utilities/ovs-vsctl.c
vswitchd/bridge.c
vswitchd/vswitch-idl.ovsidl
xenserver/opt_xensource_libexec_interface-reconfigure