]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
OVS lib defer apply doesn't handle concurrency
authorÉdouard Thuleau <edouard.thuleau@cloudwatt.com>
Mon, 3 Mar 2014 17:08:33 +0000 (18:08 +0100)
committerThomas Goirand <thomas@goirand.fr>
Mon, 9 Jun 2014 15:06:54 +0000 (23:06 +0800)
commit7e9cd643e4a3f864299e206a00d7f0f6dba936e3
treea2715aa72105e9e0d2a2eb9594e1909f113df398
parent2489d11c4e075e014eb93d546ec43dd638f14d93
OVS lib defer apply doesn't handle concurrency

The OVS lib deferred apply methods use a dict to save flows to add,
modify or delete when deffered apply is switched off.
If another thread adds, modifies or deletes flows on that dict during
another process called deffered_apply_off, its flows could be ignored.

This fix stash reference flows list and point the flows list to a new
cleared flows list. Then, it applies flows from the stashed flows list.

Closes-bug: #1263866
Change-Id: Ia3c6ce181e1599d1474da7eb944feff7d84f1d73
(cherry picked from commit 501213686886baccd3280e10b8856a25d3517519)
neutron/agent/linux/ovs_lib.py
neutron/tests/unit/openvswitch/test_ovs_lib.py