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>
* disable system stats collection. */
system_stats_enable(false);
return;
- } else if (!ovsdb_idl_has_lock(idl)) {
+ } else if (!ovsdb_idl_has_lock(idl)
+ || !ovsdb_idl_has_ever_connected(idl)) {
+ /* Returns if not holding the lock or not done retrieving db
+ * contents. */
return;
}
cfg = ovsrec_open_vswitch_first(idl);