[GENIUS-69] Flow based tunnels not being handled correctly Created: 30/Mar/17 Updated: 30/Oct/17 Resolved: 29/May/17 |
|
| Status: | Resolved |
| Project: | genius |
| Component/s: | General |
| Affects Version/s: | (unspecified) |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jaime Caamaño Ruiz | Assignee: | Vishal Thapar |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 8107 |
| Description |
|
So this is what I am doing. I am enabling the global netvirt option to use OF tunnels. This makes netvirt make the TZs VTEPs with that option. Let's say I have 2 nodes so 2 VTEPs. I see the corresponding logical tunnel interfaces in IETF config interfaces. > { , , , > ] I see none in the IETF operational interfaces. > { , , , > ] In Genius child interface info, I see both VTEPS as child of other two tunnel interfaces: > { > ] > ] > ] > ] Looking at one node, the flow based tunnel is there: > 41883803-1d4e-4a5c-8c87-a1403f97f966 > ovs_version: "2.6.1" But no handling for it on Table 0: > cookie=0x8000000, duration=15.065s, table=0, n_packets=6, n_bytes=480, |
| Comments |
| Comment by Vishal Thapar [ 30/Mar/17 ] |
|
Working on the patch. |
| Comment by Vishal Thapar [ 30/Mar/17 ] |
|
@Jaime: Could you try one thing with this? When you see interfaces show up in child but not in interface state or in flows, can you try reconnecting switch [OF controller] to ODL? I had tested this code and it was working when I first pushed it. I believe at some point other changes, namely Alon's parentRef fixes, modified the timing in such a way that it is not working. Looking at the code we update interface states based on child-interface information. I have rest of the changes ready. If this workaround works for you, then it means my understanding is correct and no more work needed on my patch. |
| Comment by Vishal Thapar [ 03/Apr/17 ] |
|
https://git.opendaylight.org/gerrit/#/c/54251/ Tested update in interface and tunnel state. Couldn't test datapath in my setup. |
| Comment by Jaime Caamaño Ruiz [ 03/Apr/17 ] |
|
I have removed and added the controller: ovs-vsctl del-controller br-int and nothing really changed in interfaces-state, tunnels still missing. Also tried stop and starting the controller and all interfaces-state disappeared and con duplicate flow tunnels in OVS: f3f6ea90-929f-4c77-96fe-bf891ddedba6 Port br-int Interface br-int type: internal Port "tun16382fe263d" Interface "tun16382fe263d" type: vxlan options: {key=flow, local_ip="172.19.0.3", remote_ip=flow} ovs_version: "2.6.1" |
| Comment by Vishal Thapar [ 03/Apr/17 ] |
|
Yeah, I noticed another bug in state code and have pushed a patch that fixes everything. I've tested it locally. Can you try out the patch in my previous comment? |
| Comment by Jaime Caamaño Ruiz [ 03/Apr/17 ] |
|
Using both https://git.opendaylight.org/gerrit/#/c/54251/ just in case. I managed to get one operational entry: — > { , , , , > ] — > { , ,na-if-type:l2vlan", , > ] — > { > ] > ] > ] > ] — Trying to understand a bit of what is happenning so I can help you out more. I assume with this change: > if that there should be an operational entry for the parent tunnel. And an Also, there might be a race condition between the child entry creation in operational, and the port configuration in OVSDB (they go into different queues in BatchingUtils). When this happens, the parent tunnel inventory state add might not create the appropiate operational state for all child entries. Hope it helps. |
| Comment by Jaime Caamaño Ruiz [ 03/Apr/17 ] |
|
Ignore this part > I assume with this change: > |
| Comment by Vishal Thapar [ 03/Apr/17 ] |
|
No, this interface will not have entry in config or operational, only in child interface info. State will not be added but code for it will be triggered fo its child interfaces and those are ones we want. Parent will start showing up once we support a use case of being able to create tunnels without known remote points so services can bind to those and decide remote-ip themselves, option 2 discussed in the mail thread. tun2ff14bc55ea should've also shown up in inventoryState. 54112 is not needed for this, that is just to get information from caches. The probability of race condition is really low because we add child info before adding to OSVDB. Actual state doesn't get created till port shows up on switch and we get notifiation back. Code is written in such a way that OVSDB port addition or OF state addition both can be received in any order. Anyhow, we got CSIT coming up for OFTunnels, so won't really merge this till those are in place. Brady tested with 54112 and it seems to solve the SFC requirements. Any issues with these two together, I'll address before this is merged. |
| Comment by Jaime Caamaño Ruiz [ 03/Apr/17 ] |
|
Vishal, unless I am understanding something wrong, I would not discard the possibility of a race condition so easily. There is no happens-before relationship between child entry creation and port creation (or the inventory state listener where the interface-state of child entries is added). Just to test, I moved the child entry creation from the DEFAULT_CONFIG queue to the TOPOLOGY_CONFIG queue (InterfaceManagerCommonUtils::createInterfaceChildEntry), the same queue used for port creation and now I got both tun operational entries: { , , , , , > ] |
| Comment by Vishal Thapar [ 03/Apr/17 ] |
|
(In reply to Jaime Caamaño Ruiz from comment #9) creatInterfaceChildEntry is used for both tunnel and non-tunnel interfaces, so we can't use that. Non-tunnel will not be created in topology_config, only interface_config. We use Interface_Config as key in DSJC to order events for a given itnerfae irrespective of which shard it is writing/reading on. Maybe your fix is correct for this case, but I haven't tried both patchs together or seen the issue [all tunnels came up for me correctly]. |
| Comment by Jaime Caamaño Ruiz [ 03/Apr/17 ] |
|
Yeah, I agree with you it is not the correct fix, just a quick way to test it out. Maybe a child interface entry listener that would call OvsInterfaceStateAddHelper::addState. |