[NETVIRT-875] Flows of created NWs are deleted one flow at a time when creating new NW after 1000 NWs were created. Created: 30/Aug/17  Updated: 19/Oct/17  Resolved: 03/Oct/17

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Carbon
Fix Version/s: None

Type: Bug
Reporter: Ran Xiao Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: File ovs.tar.gz     HTML File xaa     HTML File xab     HTML File xac     HTML File xad     HTML File xae     HTML File xaf     HTML File xag     HTML File xah     HTML File xai     HTML File xaj     HTML File xak    
External issue ID: 9077

 Description   

Environment Details:
OpenStack Version: stable/ocata
ODL Version: carbon-FR + L2GW related patches
ODL MAX heap: JAVA_MAX_MEM="6144m"

Issue:
 Flows of created NWs are deleted one flow at a time when creating new NW after 1000 NWs were created.
 These deleted flows are flows in Controller Node.
 Below is an exmaple of deleted flow:
cookie=0x8800001, table=55, priority=10,tun_id=0x1,metadata=0x10000000000/0xfffff0000000000 actions=drop

Detailed Phenomenon:
1st NW Creation: Flows of the 1st NW are successfully registered in br-int (controller node)
2nd NW Creation: Flows of the 2nd NW are successfully registered in br-int
. .
. .
. .
999th NW Creation: Flows of the 999th NW are successfully registered in br-int
1000th NW Creation: Flows of the 1000th NW are successfully registered in br-int
1001th NW Creation: Flows of the 1001th NW are successfully registered in br-int
one flow of the 1st NW is deleted
1002th NW Creation: Flows of the 1002th NW are successfully registered in br-int
one flow of the 2nd NW is deleted
: :
1010th NW Creation: Flows of the 1010th NW are successfully registered in br-int
one flow of the 10th NW is deleted

  1. confirmed until the 1010th NW creation

Attachment:
ovs.tar.gz ovs information (executed after the 1st, 2nd, 999th, 1000th, 1001th and 1002th NW creation)
ovs-vsctl show
ovs-ofctl -Oopenflow13 dump-flows br-int
ovs-ofctl -Oopenflow13 show br-int
ovs-ofctl -Oopenflow13 dump-groups br-int
xaa - xak ODL logs (splited)



 Comments   
Comment by Ran Xiao [ 30/Aug/17 ]

Attachment ovs.tar.gz has been added with description: ovs info

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xaa has been added with description: Karaf log 1

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xab has been added with description: Karaf log 2

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xac has been added with description: Karaf log 3

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xad has been added with description: Karaf log 4

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xae has been added with description: Karaf log 5

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xaf has been added with description: Karaf log 6

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xag has been added with description: Karaf log 7

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xah has been added with description: Karaf log 8

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xai has been added with description: Karaf log 9

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xaj has been added with description: Karaf log 10

Comment by Ran Xiao [ 30/Aug/17 ]

Attachment xak has been added with description: Karaf log 11

Comment by Ran Xiao [ 30/Aug/17 ]

The source codes caused this issue are:
netvirt/vpnservice/elanmanager/elanmanager-impl/src/main/java/org/opendaylight/netvirt/elan/internal/ElanInterfaceManager.java

The following two flows are added by setupFilterEqualsTable():
cookie=0x8800001, table=55, priority=10,tun_id=0x1,metadata=0x10000000000/0xfffff0000000000 actions=drop * the deleted flow
cookie=0x8800001, table=55, priority=9,tun_id=0x1 actions=load:0x100->NXM_NX_REG6[],resubmit(,220)

The flow is generated as below:
Flow flow = MDSALUtil.buildFlowNew(NwConstants.ELAN_FILTER_EQUALS_TABLE,
getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, ifTag), 9, elanInfo.getElanInstanceName(), 0, 0,
ElanConstants.COOKIE_ELAN_FILTER_EQUALS.add(BigInteger.valueOf(ifTag)),
elanUtils.getTunnelIdMatchForFilterEqualsLPortTag(ifTag),
elanUtils.getInstructionsInPortForOutGroup(interfaceInfo.getInterfaceName()));
Flow flowEntry = MDSALUtil.buildFlowNew(NwConstants.ELAN_FILTER_EQUALS_TABLE,
getFlowRef(NwConstants.ELAN_FILTER_EQUALS_TABLE, 1000 + ifTag), 10, elanInfo.getElanInstanceName(), 0,
0, ElanConstants.COOKIE_ELAN_FILTER_EQUALS.add(BigInteger.valueOf(ifTag)),
getMatchesForFilterEqualsLPortTag(ifTag), MDSALUtil.buildInstructionsDrop());
*the 2nd argument is '1000 + ifTag', fixed in the code.

The 2nd argument of MDSALUtil.buildFlowNew() is String flowId for flow management which is generated by tableId + elanTag.
Therefore,
flowId of the 1st NW : priority=9 flow, flowId="551"
priority=10 flow, flowId="551001"
flowId of the 1001th NW : priority=9 flow, flowId="551001"
priority=10 flow, flowId="552001"

Thus, the flowId of the 1001th network is duplicate with the flow of the 1st NW,
resulting the flow of the 1st NW being deleted(overwritten)

Comment by Ran Xiao [ 12/Sep/17 ]

Patch created:
https://git.opendaylight.org/gerrit/#/c/63015

Waiting for review.

Generated at Wed Feb 07 20:22:41 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.