From: Ramu Ramamurthy Date: Sat, 5 Mar 2016 01:40:26 +0000 (-0500) Subject: ovn-controller: race between binding-run and patch-run for localnet ports X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=3a83007a76bbf05144cee1fda7ad81c1c717dca7 ovn-controller: race between binding-run and patch-run for localnet ports 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 Signed-off-by: Russell Bryant --- diff --git a/ovn/controller/patch.c b/ovn/controller/patch.c index 753ce3ec4..cfae613e7 100644 --- a/ovn/controller/patch.c +++ b/ovn/controller/patch.c @@ -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; }