[OPNFLWPLUG-63] No of active flows are not getting updated for the respective table in http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1 Created: 30/Jan/14  Updated: 27/Sep/21  Resolved: 30/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: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Windows
Platform: PC



 Description   

Steps that I tried in my setup.

Start the controller with -of13 option.
Start the mininet i.e., sudo mn --controller=remote,ip=127.0.0.1 --topo tree,2 --switch ovsk,protocols=OpenFlow13

1. PUT http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/table/248/flow/1

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo</flow-name>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.10.2/24</ipv4-destination>
</match>
<id>1</id>
<table_id>248</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

2. GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1

Check the respective table (Here in this example, find "flow-node-inventory:id": 248,and see the field active flows gets updated i.e, in this case, it should be
"opendaylight-flow-table-statistics:active-flows": 1, whereas in the response it is still showing "opendaylight-flow-table-statistics:active-flows": 0

Repeat Step 2 and see if that works for now. If not proceed to the next step.

3. GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/table/248/

see the field active flows gets updated i.e, in this case, it should be
"opendaylight-flow-table-statistics:active-flows": 1. If not, resend this request again and check the same. (Its actually works!)

4. Again, repeat the step 2 and you will see it is updated as see the field active flows gets updated i.e, in this case, it should be
"opendaylight-flow-table-statistics:active-flows": 1,

Issue: Whenever you create a table, the active flows doesn't updated at

GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1

until you send the below request

GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/table/248/

Issue: Whenever you create a table, the active flows doesn't updated in
GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1

until you send the below request
GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/table/248/

-------------------------------------------------------------------------------

Issue for OF10 is, the active flows doesn't gets updated even if you try to follow the above steps!

Start the mininet i.e., sudo mn --controller=remote,ip=127.0.0.1 --topo tree,2

1. PUT http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/table/248/flow/1

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<priority>2</priority>
<flow-name>Foo</flow-name>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.10.2/24</ipv4-destination>
</match>
<id>1</id>
<table_id>250</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

2. GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1

Check the respective table (Here in this example, find "flow-node-inventory:id": 248,and see the field active flows gets updated i.e, in this case, it should be
"opendaylight-flow-table-statistics:active-flows": 1, whereas in the response it is still showing "opendaylight-flow-table-statistics:active-flows": 0

Repeat Step 2 and see if that works for now. If not proceed to the next step.

3. GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1/table/250/

see the field active flows gets updated i.e, in this case, it should be
"opendaylight-flow-table-statistics:active-flows": 1. If not, resend this request again and check the same. (Its actually works!)

4. Again, repeat the step 2 and here, you will NOT see it updated. See the field active flows gets updated or not i.e, in this case, it should be
"opendaylight-flow-table-statistics:active-flows": 1,

Let me know if you need any more information about this!

Thanks,
Madhusudhan



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

Hi Madhusudhan,

Aggregate flow statistics and Flow table statistics get updated after a time interval of 15 seconds. Statistics manager send these request at a periodic interval of 15 seconds. But it has some exceptional cases, like when you add flow, it will immediately send an individual flow statistics request to fetch the flow stats. Similarly we do this whenever any new node/group/meter/queue added. But aggregate flow statistics and flow table statistics request being send in every 15 seconds rather then on flow updates, because of performance reason.

So if you wait for 15 seconds after adding flow, you will see flow stats even on following URI

GET http://localhost:8080/restconf/datastore/opendaylight-inventory:nodes/node/openflow:1

because /node/openflow:1/table/248, is just one level deeper, but both the URI shows the same stats.

In case of Openflow10 mininet, it only support one table, and that is table=0. So even if you are trying to install flow in table=250, it will get installed in table =0. That's the reason you are not seeing any update in flow statistics of table 250, but if you dump statistics of table=0, you will see the updates in count.

Thanks
ANil

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