[OPNFLWPLUG-27] IP address missing from flow stat in AD-SAL NSF Created: 13/Jan/14  Updated: 27/Sep/21  Due: 23/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
Platform: PC



 Description   

show flow stats:

After you create a static host with host body (It works and succeeded), but if see the show flow stats using

GET http://10.125.136.52:8080/controller/nb/v2/statistics/default/flow through REST-API, it works and I could NOT see the flows created by Simple Fwd app



 Comments   
Comment by Anil Vishnoi [ 17/Jan/14 ]

Hi Madhusudhan,

Can you please explain the issue bit more. Are you testing with openflow 1.3 plugin ? or are you facing this issue with the controller default ad-sal plugin?

Can you please provide the instructions for recreating this issue, so that i can locally re-create the issue and try to provide the resolution.

If this issue is not related to openflow 1.3 plugin, can you please change the project from openflowplugin to controller.

Thanks
Anil

Comment by Madhusudhan Ananderi [ 17/Jan/14 ]

Hi Anil,

From the documentary listed here at https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT_Test_Plan_Base, see section "Host Tracker"

By using OF1.0 Plugin:

1. When I try to "add static host" i.e., PUT http://10.125.136.52:8080/controller/nb/v2/hosttracker/default/address/10.1.0.4 + host1 body), I am getting 200 OK

2. When I see "show flow stats" i.e., GET http://10.125.136.52:8080/controller/nb/v2/statistics/default/flow, I am not getting anything in the body and could not see the flows

By using OF1.3 Plugin:

Repeat the steps 1 and 2.

So the issue is, I could not see the flow stats.

Thanks,
Madhusudhan

Comment by Anil Vishnoi [ 17/Jan/14 ]

Hi Madhusudhan,

To look at the openflow 1.0 plugin issue, you have to move it to controller project.

Please open another bug against openflowplugin project for openflow 1.3 related issue. Please provide steps for testing in the bug, so that i can locally recreate this issue.

Thanks
Anil

Comment by Madhusudhan Ananderi [ 17/Jan/14 ]

Hey Anil,

I think, I created a confusion here.

Actually, the issue is on Mininet not the plugin..

From the documentary listed here at https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT_Test_Plan_Base, see section "Host Tracker"

By using OF1.0 Mininet:

1. When I try to "add static host" i.e., PUT http://10.125.136.52:8080/controller/nb/v2/hosttracker/default/address/10.1.0.4 + host1 body), I am getting 200 OK

2. When I see "show flow stats" i.e., GET http://10.125.136.52:8080/controller/nb/v2/statistics/default/flow, I am not getting anything in the body and could not see the flows

By using OF1.3 Mininet:

Repeat the steps 1 and 2.

So the issue is, I could not see the flow stats.

Comment by Anil Vishnoi [ 17/Jan/14 ]

Hi Madhusudhan,

Just want to clarify, are you testing following stack?

AD-SAL->AD-SAL Adaptor>MD-SAL->Openflow 1.3 plugin

or Are you testing the original stack
AD-SAL--> Old Openflowplugin

How do you run your controller ?

Thanks
Anil

Comment by Madhusudhan Ananderi [ 17/Jan/14 ]

Hi Anil,

I am testing this following stack:

AD-SAL->AD-SAL Adaptor>MD-SAL->Openflow 1.3 plugin

Thanks,
Madhusudhan

Comment by Anil Vishnoi [ 22/Jan/14 ]

Hi Madhusudhan/Ed,

Can you please let me know how do you build distribution and invoke controller to test this scenario/stack? Is it the same way we do for protocol plugin project ?

Thanks
Anil

Comment by Madhusudhan Ananderi [ 22/Jan/14 ]

Anil,

Sure. Here are the steps that I have followed for building the controller and mininet

1. wget https://jenkins.opendaylight.org/integration/job/integration-project-controller-integration/lastSuccessfulBuild/artifact/distributions/base/target/distributions-base-0.1.0-SNAPSHOT-osgipackage.zip
2. cd opendaylight
3. ./run.sh -of13
4. Start mininet
5. sudo mn --controller=remote,ip=127.0.0.1 --topo tree,2 --switch ovsk,protocols=OpenFlow13

  • Madhusudhan
Comment by Madhusudhan Ananderi [ 23/Jan/14 ]

Hi,

After creating a static host, I could not see the flow stats, which contains the static IP address. Hence the flow stats is failing.

This applies to only OF10 mininet.

Comment by Madhusudhan Ananderi [ 23/Jan/14 ]

Hi,

To be clear, After creating a static host, I could see the flow stats in the response ,but the IP address is missing. Hence the flow stats is failing.

This applies to only OF10 mininet.

Comment by Anil Vishnoi [ 23/Jan/14 ]

Hi Madhushudhan,

You mention that you are use following command to invoke the mininet

5. sudo mn --controller=remote,ip=127.0.0.1 --topo tree,2 --switch ovsk,protocols=OpenFlow13

And later on you mentioned "This applies to only OF10 mininet.". Can you please clarify a bit, Sorry if i am missing any context.

Meanwhile i will follow your steps and will try to recreate it locally.

Thanks
Anil

Comment by Madhusudhan Ananderi [ 23/Jan/14 ]

Anil,

Try using this command to invoke the mininet:

sudo mn --controller=remote,ip=127.0.0.1 --topo tree,2

The steps that I mentioned is for general purpose.

This issue is happening only for OF10 mininet.

Comment by Anil Vishnoi [ 23/Jan/14 ]

Hi Madhusudhan,

I did following setup to recreate the issue locally:
1) Download the latest base version of the controller using wget from

https://jenkins.opendaylight.org/integration/job/integration-project-controller-integration/lastSuccessfulBuild/artifact/distributions/base/target/distributions-base-0.1.0-SNAPSHOT-osgipackage.zip

2) Start controller using ./run.sh -of13

3) Start mininet with following command

sudo mn --controller=remote,ip=<MyMachineIp>:6633 --topo tree,2

4) Then i tried to add static host using following REST URI:
http://<MyMachineIp>:8080/controller/nb/v2/hosttracker/default/address/10.1.0.4

with body

<hostConfig>
<dataLayerAddress>8e:ad:13:44:4d:8c</dataLayerAddress>
<networkAddress>10.1.0.4</networkAddress>
<nodeType>OF</nodeType>
<nodeId>00:00:00:00:00:00:00:03</nodeId>
<nodeConnectorType>OF</nodeConnectorType>
<nodeConnectorId>2</nodeConnectorId>
<staticHost>true</staticHost>
</hostConfig>

When i send this PUT request i get Error-404 with following message
"OF|00:00:00:00:00:00:00:03 : Node does not exist"

5) Then I thought lets check the stats anyways. I used following URL to get the stats

http://<MyMachineIp>:8080/controller/nb/v2/statistics/default/flow

I got following result which seems to be okay to me because there was no flow on any of the switch:
{
"flowStatistics": [
{
"node":

{ "id": "openflow:1", "type": "MD_SAL" }

,
"flowStatistic": []
},
{
"node":

{ "id": "openflow:3", "type": "MD_SAL" }

,
"flowStatistic": []
},
{
"node":

{ "id": "openflow:2", "type": "MD_SAL" }

,
"flowStatistic": []
}
]
}

6) Then i tried pingall on mininet and fired same REST API again to get the stats. I received following response:
{
"flowStatistics": [
{
"node":

{ "id": "openflow:1", "type": "MD_SAL" }

,
"flowStatistic": [
{
"flow": {
"match": {
"matchField": [

{ "type": "DL_TYPE", "value": "2048" }

]
},
"actions": [

{ "type": "OUTPUT" }

],
"priority": 1,
"idleTimeout": 0,
"hardTimeout": 0,
"id": 0
},
"tableId": 0,
"durationSeconds": 255,
"durationNanoseconds": 555000000,
"packetCount": 5,
"byteCount": 490
}
]
},
{
"node":

{ "id": "openflow:3", "type": "MD_SAL" }

,
"flowStatistic": [
{
"flow": {
"match": {
"matchField": [

{ "type": "DL_TYPE", "value": "2048" }

]
},
"actions": [

{ "type": "OUTPUT" }

],
"priority": 1,
"idleTimeout": 0,
"hardTimeout": 0,
"id": 0
},
"tableId": 0,
"durationSeconds": 255,
"durationNanoseconds": 329000000,
"packetCount": 13,
"byteCount": 1274
}
]
},
{
"node":

{ "id": "openflow:2", "type": "MD_SAL" }

,
"flowStatistic": [
{
"flow": {
"match": {
"matchField": [

{ "type": "DL_TYPE", "value": "2048" }

]
},
"actions": [

{ "type": "OUTPUT" }

],
"priority": 1,
"idleTimeout": 0,
"hardTimeout": 0,
"id": 0
},
"tableId": 0,
"durationSeconds": 255,
"durationNanoseconds": 738000000,
"packetCount": 5,
"byteCount": 490
}
]
}
]
}
It looks fine to me ( apart from a minor issue in action part). Because if you dump-flow on switch it shows following flow ( on s1 – openflow:1)

mininet> sh ovs-ofctl dump-flows s1
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=236.035s, table=0, n_packets=5, n_bytes=490, idle_age=115, priority=1,ip actions=output:2

So dl_type=2048 (0x800) means IP and this is what flow also shows.

Till now thing looks fine.

Let me know if i missed any step in the testing, will try to recreate it again.

Thanks
Anil

Comment by Madhusudhan Ananderi [ 23/Jan/14 ]

1. From your comments, Use the following body for step 4 and confirm back?

<hostConfig>
<dataLayerAddress>8e:ad:13:44:4d:8c</dataLayerAddress>
<networkAddress>10.1.0.4</networkAddress>
<nodeType>MD_SAL</nodeType>
<nodeId>openflow:3</nodeId>
<nodeConnectorType>MD_SAL</nodeConnectorType>
<nodeConnectorId>openflow:3:2</nodeConnectorId>
<staticHost>true</staticHost>
</hostConfig>

Note: Reason in being used this body is, we are using the new plugin controller (OF13 controller, obviously we need to send the correct node request. For details you can visit here at https://wiki.opendaylight.org/view/CrossProject:Integration_Group:CSIT_Test_Plan_Base_of13 and look "Host Tracker" section)

2. Once you done with the above step, you should be able to see specific IP address i.e 10.1.0.4 in step 5

For clear information, try comparing the same with OF13 mininet i.e edit the step 2 in your comment with this one: sudo mn --controller=remote,ip=127.0.0.1 --topo tree,2 --switch ovsk,protocols=OpenFlow13

Comment by Anil Vishnoi [ 27/Jan/14 ]

Hi Madhusudhan,

This bug is similar to OPNFLWPLUG-26. I fixed the issue and pushed the changes through

https://git.opendaylight.org/gerrit/#/c/4872/

Also I updated OPNFLWPLUG-27 with more detail about the issue.

Thanks
Anil

Comment by Madhusudhan Ananderi [ 27/Jan/14 ]

Hi,
Can you please let me know the link for the latest controller.

I am still replicating this issue now after I download the latest controller at

wget https://jenkins.opendaylight.org/integration/job/integration-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/base/target/distributions-base-0.1.0-SNAPSHOT-osgipackage.zip

Thanks

Comment by Anil Vishnoi [ 28/Jan/14 ]

Hi Madhusudhan,

Sunny is able to verify the fix, and looks like issue is fixed now.

You can get more details from OPNFLWPLUG-26.

Let me know if you need any more info.

Thanks
Anil

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