]> 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)
committerÉdouard Thuleau <edouard.thuleau@cloudwatt.com>
Sat, 10 May 2014 16:31:40 +0000 (18:31 +0200)
commit501213686886baccd3280e10b8856a25d3517519
treefec7b5f8b32c7acd3698b16147ebc757c19bbaad
parent70214434caa02b06efed0716111ef1586ac64582
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
neutron/agent/linux/ovs_lib.py
neutron/tests/unit/agent/linux/test_ovs_lib.py