-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 1.6.0
-
Component/s: None
-
Labels:None
-
Story Points:5
I'm not sure that I have to make my application to not to install the same rule multiple times in any case but I can see the issue described below.
How to reproduce:
1. Run ONOS with multiple instances
2. Install flow rule 'A' to a switch
: successfully installed with flow ID 'X'
3. Rebalance master
4. Install flow rule 'A' again from the new master
: flow rule A with ID 'X' stays in PENDING_ADD state for a while but goes to ADDED state back soon
5. Try to remove flow rule 'A'
: flow rule A with ID 'X' is removed but the same rule A with ID 'Y' is added to store and data plane as well
I get this log in step 4, id=340000deca6a21 is the ID of the existing rule.
2016-03-09 21:18:36,855 | DEBUG | f-event-stats-22 | FlowRuleManager | 115 - org.onosproject.onos-core-net - 1.5.0.SNAPSHOT | Flow DefaultFlowEntry{rule=DefaultFlowEntry{id=340000deca6a21, deviceId=of:0000000000000002, priority=5000, selector=[ETH_TYPE:ipv4, IPV4_SRC:192.168.0.0/24, IPV4_DST:192.168.0.0/24], treatment=DefaultTrafficTreatment{immediate=[], deferred=[], transition=TABLE:4, cleared=false, metadata=null}, tableId=2, created=1457576316813, payLoad=null}, state=ADDED} is on switch but not in store.
And id=340000cb7bb291 is newly added duplicated rule.
2016-03-09 21:18:36,856 | DEBUG | f-event-stats-22 | FlowRuleManager | 115 - org.onosproject.onos-core-net - 1.5.0.SNAPSHOT | Flow DefaultFlowEntry{rule=DefaultFlowEntry{id=340000cb7bb291, deviceId=of:0000000000000002, priority=5000, selector=[ETH_TYPE:ipv4, IPV4_SRC:192.168.0.0/24, IPV4_DST:192.168.0.0/24], treatment=DefaultTrafficTreatment{immediate=[], deferred=[], transition=TABLE:4, cleared=false, metadata=null}, tableId=2, created=1457576205702, payLoad=null}, state=PENDING_ADD} removed
Before I remove the rule, the new rule is added.
onos> flows | grep IPV4_SRC:192.168.0.0/24 id=340000cb7bb291, state=ADDED, bytes=0, packets=0, duration=13, priority=5000, tableId=2, appId=org.onosproject.cordvtn, payLoad=null, selector=[ETH_TYPE:ipv4, IPV4_SRC:192.168.0.0/24, IPV4_DST:192.168.0.0/24], treatment=DefaultTrafficTreatment{immediate=[], deferred=[], transition=TABLE:4, cleared=false, metadata=null}
After I removed the rule, the old rule is back.
onos> flows | grep IPV4_SRC:192.168.0.0/24 id=340000deca6a21, state=ADDED, bytes=0, packets=0, duration=29, priority=5000, tableId=2, appId=org.onosproject.cordvtn, payLoad=null, selector=[ETH_TYPE:ipv4, IPV4_SRC:192.168.0.0/24, IPV4_DST:192.168.0.0/24], treatment=DefaultTrafficTreatment{immediate=[], deferred=[], transition=TABLE:4, cleared=false, metadata=null}
- relates to
-
ONOS-4154 Generates consistent hash across multiple instances for flow ID
-
- Closed
-