]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Adds OVS_lib_defer_apply_doesn_t_handle_concurrency.patch
authorThomas Goirand <thomas@goirand.fr>
Tue, 8 Apr 2014 16:01:29 +0000 (00:01 +0800)
committerThomas Goirand <thomas@goirand.fr>
Tue, 8 Apr 2014 16:01:29 +0000 (00:01 +0800)
Change-Id: Ie1e469decd5ec1068133efffe29e15463812e086

debian/changelog
debian/patches/OVS_lib_defer_apply_doesn_t_handle_concurrency.patch [new file with mode: 0644]
debian/patches/series

index edf7ce7b6b9a5c2768f2f1025d5037ebe623a9c2..6526c7c4b848ef08d30a8133b7dab363fab0b322 100644 (file)
@@ -1,6 +1,7 @@
 neutron (2014.1~rc1-2) experimental; urgency=low
 
   * More SQLite migration fixes for Icehouse.
+  * Added OVS_lib_defer_apply_doesn_t_handle_concurrency.patch
 
  -- Thomas Goirand <zigo@debian.org>  Mon, 07 Apr 2014 14:23:29 +0800
 
diff --git a/debian/patches/OVS_lib_defer_apply_doesn_t_handle_concurrency.patch b/debian/patches/OVS_lib_defer_apply_doesn_t_handle_concurrency.patch
new file mode 100644 (file)
index 0000000..5809fed
--- /dev/null
@@ -0,0 +1,38 @@
+Description: OVS lib defer apply doesn't handle concurrency
+ 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.
+Author: Ă‰douard Thuleau <edouard.thuleau@cloudwatt.com>
+Origin: upstream, https://review.openstack.org/#/c/85492
+Date: Mon, 3 Mar 2014 17:08:33 +0000 (+0100)
+X-Git-Url: https://review.openstack.org/gitweb?p=openstack%2Fneutron.git;a=commitdiff_plain;h=dc4ce5946de0686e07eff79704be497c649734d2
+Bug-Ubuntu: https://launchpad.net/bugs/1263866
+Last-Update: 2014-04-08
+
+--- neutron-2014.1~rc1.orig/neutron/agent/linux/ovs_lib.py
++++ neutron-2014.1~rc1/neutron/agent/linux/ovs_lib.py
+@@ -213,9 +213,16 @@ class OVSBridge(BaseOVS):
+                 for line in flows.splitlines():
+                     LOG.debug(_('%(action)s: %(flow)s'),
+                               {'action': action, 'flow': line})
+-                self.run_ofctl('%s-flows' % action, ['-'], flows)
++        # Note(ethuleau): stash flows and disable deferred mode. Then apply
++        # flows from the stashed reference to be sure to not purge flows that
++        # were added between two ofctl commands.
++        stashed_deferred_flows, self.deferred_flows = (
++            self.deferred_flows, {'add': '', 'mod': '', 'del': ''}
++        )
+         self.defer_apply_flows = False
+-        self.deferred_flows = {'add': '', 'mod': '', 'del': ''}
++        for action, flows in stashed_deferred_flows.items():
++            if flows:
++                self.run_ofctl('%s-flows' % action, ['-'], flows)
+     def add_tunnel_port(self, port_name, remote_ip, local_ip,
+                         tunnel_type=p_const.TYPE_GRE,
index 25b97dfe6b92bb75be0fba09dee0df6356263425..a93e36f99b66ce2043b58fda437ce2041bbdfa89 100644 (file)
@@ -1,2 +1,3 @@
 fix-alembic-migration-with-sqlite3.patch
 better-config-default.patch
+OVS_lib_defer_apply_doesn_t_handle_concurrency.patch