ovn-controller: race between binding-run and patch-run for localnet ports
authorRamu Ramamurthy <ramu.ramamurthy@gmail.com>
Sat, 5 Mar 2016 01:40:26 +0000 (20:40 -0500)
committerRussell Bryant <russell@ovn.org>
Mon, 7 Mar 2016 14:42:03 +0000 (09:42 -0500)
when ctx->ovnsb_idl_txn is null, binding_run exits early
and does not add any local_datapaths, but patch_run
doesnt check this, and ends up deleting localnet ports,
because there are no local datapaths for them,
They get readded in a subsequent run causing unnecessary
deletion and readdition.

Signed-off-by: Ramu Ramamurthy <ramu.ramamurthy@us.ibm.com>
Signed-off-by: Russell Bryant <russell@ovn.org>
ovn/controller/patch.c

index 753ce3e..cfae613 100644 (file)
@@ -280,7 +280,7 @@ void
 patch_run(struct controller_ctx *ctx, const struct ovsrec_bridge *br_int,
           struct hmap *local_datapaths)
 {
-    if (!ctx->ovs_idl_txn) {
+    if (!ctx->ovs_idl_txn || !ctx->ovnsb_idl_txn) {
         return;
     }