diff mbox

[ovs-dev] Revert "ovn-controller: race between binding-run and patch-run for localnet ports"

Message ID 201603082223.u28MNJFe025525@d03av01.boulder.ibm.com
State Accepted
Headers show

Commit Message

Suryanarayan Ramamurthy March 8, 2016, 10:23 p.m. UTC
Ben,

I still see a problem in my tests on master with localnet ports getting 
deleted unnecessarily - Here is a log of a run.. I added some logs
to try to narrow down the problem.

2016-03-08T22:10:30.768Z|00001|vlog|INFO|opened log file 
/home/ovs/ovs/tests/testsuite.dir/2025/hv/ovn-controller.log
2016-03-08T22:10:30.769Z|00002|reconnect|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/db.sock: 
connecting...
2016-03-08T22:10:30.770Z|00003|reconnect|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/db.sock: 
connected
2016-03-08T22:10:30.775Z|00004|reconnect|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/ovn-sb/ovn-sb.sock: 
connecting...
2016-03-08T22:10:30.775Z|00005|reconnect|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/ovn-sb/ovn-sb.sock: 
connected
2016-03-08T22:10:30.777Z|00006|binding|INFO|in binding_run
2016-03-08T22:10:30.777Z|00007|binding|INFO|adding datapath 201
2016-03-08T22:10:30.777Z|00008|binding|INFO|Claiming lport localvif201 for 
this chassis.
2016-03-08T22:10:30.777Z|00009|binding|INFO|adding datapath 103
2016-03-08T22:10:30.777Z|00010|binding|INFO|Claiming lport localcif4 for 
this chassis.
2016-03-08T22:10:30.777Z|00011|binding|INFO|Claiming lport localcif5 for 
this chassis.
2016-03-08T22:10:30.777Z|00012|binding|INFO|Claiming lport localcif3 for 
this chassis.
2016-03-08T22:10:30.777Z|00013|binding|INFO|Claiming lport localcif1 for 
this chassis.
2016-03-08T22:10:30.777Z|00014|binding|INFO|Claiming lport localcif2 for 
this chassis.
2016-03-08T22:10:30.777Z|00015|binding|INFO|Claiming lport localvif3 for 
this chassis.
2016-03-08T22:10:30.777Z|00016|binding|INFO|adding datapath 102
2016-03-08T22:10:30.777Z|00017|binding|INFO|Claiming lport localvif2 for 
this chassis.
2016-03-08T22:10:30.778Z|00018|binding|INFO|adding datapath 101
2016-03-08T22:10:30.778Z|00019|binding|INFO|Claiming lport localvif1 for 
this chassis.
2016-03-08T22:10:30.778Z|00020|ofctrl|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/br-int.mgmt: 
connecting to switch
2016-03-08T22:10:30.779Z|00021|rconn|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/br-int.mgmt: 
connecting...
2016-03-08T22:10:30.779Z|00022|pinctrl|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/br-int.mgmt: 
connecting to switch
2016-03-08T22:10:30.779Z|00023|rconn|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/br-int.mgmt: 
connecting...
2016-03-08T22:10:30.780Z|00024|binding|INFO|in binding_run
2016-03-08T22:10:30.780Z|00025|binding|INFO|no chassis rec
2016-03-08T22:10:30.780Z|00026|binding|INFO|null ovnsb

This is exiting here in binding_run() - I added the logs:

    chassis_rec = get_chassis(ctx->ovnsb_idl, chassis_id);
    if (!chassis_rec) {
        VLOG_INFO("no chassis rec");
        if (!ctx->ovnsb_idl_txn) {
            VLOG_INFO("null ovnsb"); 
        }
        return;
    }

2016-03-08T22:10:30.781Z|00027|patch|INFO|did not find datapath for 
localnet201
2016-03-08T22:10:30.782Z|00028|patch|INFO|did not find datapath for 
localnet1
2016-03-08T22:10:30.783Z|00029|patch|INFO|remove port 
patch-br-int-to-localnet201
2016-03-08T22:10:30.783Z|00030|patch|INFO|remove port 
patch-br-int-to-localnet1
2016-03-08T22:10:30.783Z|00031|patch|INFO|remove port 
patch-localnet201-to-br-int
2016-03-08T22:10:30.783Z|00032|patch|INFO|remove port 
patch-localnet1-to-br-int
2016-03-08T22:10:30.784Z|00033|rconn|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/br-int.mgmt: 
connected
2016-03-08T22:10:30.784Z|00034|rconn|INFO|unix:/home/ovs/ovs/tests/testsuite.dir/2025/hv/br-int.mgmt: 
connected




From:   Ben Pfaff <blp@ovn.org>
To:     dev@openvswitch.org
Cc:     Ben Pfaff <blp@ovn.org>, Ramu Ramamurthy 
<ramu.ramamurthy@gmail.com>
Date:   03/07/2016 03:08 PM
Subject:        [ovs-dev] [PATCH] Revert "ovn-controller: race between 
binding-run     and patch-run for localnet ports"
Sent by:        "dev" <dev-bounces@openvswitch.org>



This reverts commit 3a83007a76bbf05144cee1fda7ad81c1c717dca7.  It's really
nonobvious from the code why the condition added by that commit makes 
sense.
The new condition should not be necessary now that binding_run() always 
keeps
track of the local datapaths, since commit 7c040135cf351 (binding: Track 
local
datapaths even when no transaction is possible).

CC: Ramu Ramamurthy <ramu.ramamurthy@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 ovn/controller/patch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/ovn/controller/patch.c b/ovn/controller/patch.c
index cfae613..753ce3e 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 || !ctx->ovnsb_idl_txn) {
+    if (!ctx->ovs_idl_txn) {
         return;
     }