[OPNFLWPLUG-26] Forwarding Rules Manager (Installs Flows on SB devices) Created: 13/Jan/14 Updated: 27/Sep/21 Due: 22/Jan/14 Resolved: 28/Jan/14 |
|
| Status: | Resolved |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Madhusudhan Ananderi | Assignee: | Anil Vishnoi |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Windows |
||
| Attachments: |
|
| Description |
|
To remove flow1: After you create a flow1 (It got succeeded and verified too) and when you try to delete the respective flow1 i.e using DELETE http://10.125.136.52:8080/controller/nb/v2/flowprogrammer/default/node/MD_SAL/openflow:2/staticFlow/flow1 thorugh REST-API, I am getting an error '404 - Not Found' Please note this is for mininet - OF1.3. |
| Comments |
| Comment by Ed Warnicke [ 16/Jan/14 ] |
|
Note, this is the old API, not the new RESTCONF API. So this is an issue with the MD-SAL Adaptation. |
| Comment by Moiz Raja [ 18/Jan/14 ] |
|
I tried it today. This works fine for me in the sense I get a 204 - the flow itself does not get removed from the switch which is a separate issue problem on the openflowplugin/openflowjava side. |
| Comment by Ed Warnicke [ 21/Jan/14 ] |
|
Please reverify. |
| Comment by Priyanka Chopra [ 22/Jan/14 ] |
|
Verified. Works fine. Following is the test procedure followed: I created a mininet topology with 1 switch and 3 hosts on Mininet OPenflow1.3. Also can see the flows on switch through mininet : dpctl dump-flows Now if i delete the flows through URL |
| Comment by Priyanka Chopra [ 22/Jan/14 ] |
|
Attachment Screenshots_290.zip has been added with description: Screenshots for test procedure |
| Comment by Madhusudhan Ananderi [ 22/Jan/14 ] |
|
Attachment FRM_defect_OF10mininet.txt has been added with description: FRM_defect_OF10mininet |
| Comment by Madhusudhan Ananderi [ 22/Jan/14 ] |
|
Hi, It worked fine for OF13mininet as seen with the screenshots. Can you try using the same procedure for OF10 mininet? Have elaborated the defect in the attachment "FRM_defect_OF10mininet.txt" |
| Comment by Madhusudhan Ananderi [ 23/Jan/14 ] |
|
Hi, To be clear, here is the details for the issue. After you add the flow (Using OF10 mininet), I get 201 response. But, when I look at the statistics, I could not see the match field for IP address, due to which the flow statistics is failing. |
| Comment by Priyanka Chopra [ 23/Jan/14 ] |
|
I have the new openflowplugin integrated and used Mininet Openflow1.0. Have created the attachment for detailed explanation. |
| Comment by Priyanka Chopra [ 23/Jan/14 ] |
|
Attachment OF1mininet.txt has been added with description: FRM OF10 mininet |
| Comment by Madhusudhan Ananderi [ 23/Jan/14 ] |
|
Hi, Can you do the following steps in your setup and confirm back? For OF13 mininet: 1. Start the controller using -OF13 option Confirm here whether you get the correct flow 5. GET http://127.0.0.1:8080/controller/nb/v2/statistics/default/flow For OF13 mininet: 8. Use the command for mininet It will be good if you could write YES/NO with your findings for every steps to avoid confusion. Thanks |
| Comment by Madhusudhan Ananderi [ 23/Jan/14 ] |
|
Please find the correct typo error in my previous comments: For steps 8 - 11, it is for OF10 mininet. |
| Comment by Madhusudhan Ananderi [ 24/Jan/14 ] |
|
One more findings: It is not a problem on stats, the flow is NOT installed correctly in the switch after pushing this: <flowConfig> mininet@mininet-vm:~\> sudo ovs-ofctl dump-flows s2 Note there is no <NwDst> match field in the installed flow! |
| Comment by Priyanka Chopra [ 24/Jan/14 ] |
|
Hi Madhusudhan, Your observation is correct. Please find the comments inline: For OF13 mininet: 1. Start the controller using -OF13 option Yes - The flow gets installed on the switch, although we cant see the nwDst field in mininet. Confirm here whether you get the correct flow - Yes we can see the same flow we installed previously No, Match field does not show the nwDst Yes, the flow gets deleted from the switch 7. Repeat step 4 and step 5 and check the flow doesn't exists. Also i have attached a detailed report of all the usecases that i tried along with their observations. |
| Comment by Priyanka Chopra [ 24/Jan/14 ] |
|
Attachment TestCases.ods has been added with description: Test cases |
| Comment by Priyanka Chopra [ 25/Jan/14 ] |
|
I was trying to find the root cause for the missing ip field (nwSrc / nwDst) in flow statistics. As per my observations whenever any changes corresponding to flow are made, the flowStatistics cache is updated in StatisticsManager.java: So when I do <flowConfig> then, ""nodeFlowStatisticsUpdated(Node node, List<FlowOnNode> flowStatsList) {}"" method is called. While debugging I observed the flowStatsList passed as an argument to the above method missed the ip fields(nwSrc / nwDst) in match. So basically whenever the flow is created in a switch,the match fields in flowStatistics cache is not updated properly because of which it is missing in the response. Seems the issue is in Statistics manager. |
| Comment by Anil Vishnoi [ 27/Jan/14 ] |
|
Hi Madhusudhan/Priyanka, There are two minor issues that's causing this bug. 1) When user adds flow to the switch, plugin was sending 0 as a mask down to the switch (because it's not getting mask associated with the IP), and that's why you were not seeing ip address when you were dumping flows from switch. So one issue still remains is why plugin is receiving only ip address (10.0.0.1) and not mask(/32) when user is providing both -ip address with mask (10.0.0.1/32). I think somebody who is aware of that part of code should investigate this. Irrespective of this issue, if plugin gets ip address with no mask, its mask should be set to /32 rather then 0. Mask=0 means, it masks the whole IP address and makes it wildcard. Once I changed the mask to /32, I was able to see the ip address in the switch flows. Deepti/Prasanna-- can you please investigate this issue. You can follow the steps in "Comment 10" above. If you put break point in addFlow() method of ModelDrivenSwitchImpl.java and connect your eclipse to controller jvm in remote debugging mode, this is what you get as AddFlowInput: AddFlowInput [_flowRef=FlowRef [_value=InstanceIdentifier [path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:1]]], org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table[key=TableKey [_id=0]], org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow[key=FlowKey [_id=Uri [_value=677b32e3-bd81-4b06-b081-d63def7286e2]]]]]], _flowTable=FlowTableRef [_value=InstanceIdentifier [path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:1]]], org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode, org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.Table[key=TableKey [_id=0]]]]], _barrier=null, _bufferId=null, _containerName=null, _cookieMask=null, _flags=null, _flowName=null, _installHw=null, _instructions=Instructions [_instruction=[Instruction [_order=0, _key=InstructionKey [_order=0], _instruction=ApplyActionsCase [_applyActions=ApplyActions [_action=[Action [_order=null, _key=ActionKey [], _action=OutputActionCase [_outputAction=OutputAction [_maxLength=null, _outputNodeConnector=Uri [_value=openflow:1:1], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], _match=Match [_ethernetMatch=EthernetMatch [_ethernetDestination=null, _ethernetSource=null, _ethernetType=EthernetType [_type=EtherType [_value=2048], augmentation=[]], augmentation=[]], _icmpv4Match=null, _icmpv6Match=null, _inPhyPort=null, _inPort=null, _ipMatch=null, _layer3Match=Ipv4Match [_ipv4Destination=Ipv4Prefix [_value=10.0.0.1], _ipv4Source=null, augmentation=[]], _layer4Match=null, _metadata=null, _protocolMatchFields=null, _tunnel=null, _vlanMatch=null, augmentation=[]], _outGroup=null, _outPort=null, _strict=null, _cookie=0, _hardTimeout=0, _idleTimeout=0, _priority=1, _tableId=0, _node=NodeRef [_value=InstanceIdentifier [path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:1]]]]]], _transactionUri=Uri [_value=BA-3598], augmentation=[]] So if you notice IP String plugin received is 10.0.0.1 and not 10.0.0.1/32 what user entered. 2) Minor issue while decoding IP addresses from statistics response. I was using wrong wild card to make decision to decode the IP addresses. After fixing both these issues I can see that its working as expected. I pushed code changes through following gerrit: https://git.opendaylight.org/gerrit/#/c/4872/ Once it get merged can you please verify it. Thanks |
| Comment by Anil Vishnoi [ 27/Jan/14 ] |
|
Adding Prasanna/Deepti in CC |
| Comment by Madhusudhan Ananderi [ 27/Jan/14 ] |
|
I still see the same issue after merging into the latest code. FYI, I have taken the latest code at Please let me know the process/steps that you have tested so far. Thanks |
| Comment by sunny malhotra [ 28/Jan/14 ] |
|
Tested for OF10 and OF13. 1.for OF10 : sudo mn --controller=remote,ip=127.0.0.1 --topo tree,3 --switch |
| Comment by sunny malhotra [ 28/Jan/14 ] |
|
Tested for OF10 and OF13. For OF13 mininet: Yes - (201 created) Confirm here whether you get the correct flow YES-response-body <?xml version="1.0" encoding="UTF-8" standalone="yes"?> *flow also seen through dpctl dump-flows 5. GET http://127.0.0.1:8080/controller/nb/v2/statistics/default/flow YES-response body match field: <match> Yes-(204 No Content) 7. Repeat step 4 and step 5 and check the flow doesn't exists. For OF10 mininet: 8. Use the command for mininet 9. Repeat steps 3,4,5 10. Check the match field i.e IP address for the particular node (Openflow:6) in the response 11.Repeat step 6 and 7, check the flows doesn't exists. |
| Comment by Anil Vishnoi [ 28/Jan/14 ] |
|
Hi Madhusudhan, Looks like sunny is able to verify that this issue is resolved now. Sunny, can you please share the details of the build you used for verifying the fix with madhusudhan? Thanks |
| Comment by Luis Gomez [ 28/Jan/14 ] |
|
Yes, I agree this issues is fixed now. |