ovn-controller: Verify bridge ports before changing.
OVSDB is transactional but it does not have built-in protection from dirty
reads. To avoid those, it's necessary to manually add verification to
transactions to ensure that any data reads whose values were essential to
later writes have not changed. ovn-controller didn't do that for
the "ports" column in the Bridge table, which means that if the set of
ports changed when it didn't expect it, it could revert changes made by
other database clients.
In particular this showed up in a scale test, where ovn-controller would
delete "vif" ports added via ovs-vsctl.
(It's easy to see exactly what happened by looking in the database log
with "ovsdb-tool -mm show-log".)
Reported-by: Russell Bryant <rbryant@redhat.com>
Reported-at: http://openvswitch.org/pipermail/dev/2015-June/056326.html Signed-off-by: Ben Pfaff <blp@nicira.com>