]> git.proxmox.com Git - ovs.git/commit
ovn-controller: Verify bridge ports before changing.
authorBen Pfaff <blp@nicira.com>
Sun, 14 Jun 2015 01:46:34 +0000 (18:46 -0700)
committerBen Pfaff <blp@nicira.com>
Sun, 14 Jun 2015 17:50:32 +0000 (10:50 -0700)
commit6ad8ce88c31fde2d2938add9611205eef62a4141
treedeb97107ef61f4087ea2e48756683389b9b2ffee
parent03ce866e44835e43f04747cfc65b2c592d780165
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>
ovn/controller/chassis.c