bridge: Execute bridge_run() only after retrieving db contents.
authorAlex Wang <alexw@nicira.com>
Wed, 1 Apr 2015 23:11:19 +0000 (16:11 -0700)
committerAlex Wang <alexw@nicira.com>
Thu, 2 Apr 2015 00:02:39 +0000 (17:02 -0700)
commitb3cceba0b7c4013f46b01f8987e8716d7857c6db
tree3ea3a66493941d789d0732025f5e8f34f74fa704
parent508624b691e1517e4d426aa69165ea1efba80d53
bridge: Execute bridge_run() only after retrieving db contents.

During upgrade of ovs-vswitchd, we do not want to recreate the already
configured kernel interfaces.  Especially when IP address is assigned to
the internal port, the recreation will cause the lost of connection.
Therefore, ovs-vswitchd should read current ovsdb content first and then
reuse the existing kernel interfaces that are configured in ovsdb.  In
terms of the code language, ovs-vswitchd should only execute bridge_run()
after it finishes reading the ovsdb content.

However, this expected behavior is broken by the recent commit d18e52e
(ovsdb-idl: Tolerate missing tables and columns.) which causes the
execution of bridge_run() before getting the hint of configured interfaces
from ovsdb.

To fix the issue, this commit makes sure that the execution of bridge_run()
happens only after retrieving the ovsdb contents.

VMware-BZ: #1424342

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
vswitchd/bridge.c