[OPNFLWPLUG-846] Flow entry in Config DS and not available on device Created: 01/Feb/17  Updated: 27/Sep/21  Resolved: 05/Jun/17

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

Type: Bug
Reporter: balakrishnan k Assignee: balakrishnan k
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7722

 Description   

ODL version:BoronSR2

issue scenario:
Add flow(TunnelOut_1056_2_fa:16:3e:3d:e8:a7) with src MAC, dst MAC and action to physical port 1.
create one moreflow(UcastOut_1056_4_fa:16:3e:3d:e8:a7) with same match condition and action to physical port 2.
config datastore has to flows but OVS has only one flow.
Now delete the flow "TunnelOut_1056_2_fa:16:3e:3d:e8:a7" ,
flow "TunnelOut_1056_2_fa:16:3e:3d:e8:a7" removed in datastore OVS flow also remove.
finally datastore has flow "UcastOut_1056_4_fa:16:3e:3d:e8:a7" corresponding flow is missing in OVS.

step to reproduce the issue:
1.intall openflow plugin features and connect switch to controller.
2.create flow TunnelOut_1056_2_fa:16:3e:3d:e8:a7.
URL: http://10.106.138.159:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:73384666687563/table/2/flow/TunnelOut_1056_2_fa:16:3e:3d:e8:a7

Req Body:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>TunnelOut_1056_2_fa:16:3e:3d:e8:a7</flow-name>
<id>TunnelOut_1056_2_fa:16:3e:3d:e8:a7</id>
<cookie_mask>255</cookie_mask>
<cookie>103</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>openflow:181106886712112:2</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
</match>
</flow>

3.check the flow was added in OVS.

sudo ovs-ofctl -O openflow13 dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x67, duration=18.670s, table=2, n_packets=0, n_bytes=0, idle_timeout=3400, hard_timeout=1200, priority=2,ip,dl_src=00:00:00:11:23:ae,dl_dst=ff:ff:29:01:19:61 actions=output:2

4.create flow TunnelOut_1056_2_fa:16:3e:3d:e8:a7.

URL: http://10.106.138.159:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:73384666687563/table/2/flow/UcastOut_1056_4_fa:16:3e:3d:e8:a7

Req Body:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>UcastOut_1056_4_fa:16:3e:3d:e8:a7</flow-name>
<id>UcastOut_1056_4_fa:16:3e:3d:e8:a7</id>
<cookie_mask>255</cookie_mask>
<cookie>103</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<output-action>
<output-node-connector>openflow:181106886712112:4</output-node-connector>
<max-length>60</max-length>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>ff:ff:29:01:19:61</address>
</ethernet-destination>
<ethernet-source>
<address>00:00:00:11:23:ae</address>
</ethernet-source>
</ethernet-match>
</match>
</flow>

4.check the flow was added in OVS.

sudo ovs-ofctl -O openflow13 dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):
cookie=0x67, duration=18.670s, table=2, n_packets=0, n_bytes=0, idle_timeout=3400, hard_timeout=1200, priority=2,ip,dl_src=00:00:00:11:23:ae,dl_dst=ff:ff:29:01:19:61 actions=output:4

Note :only one flow is present in OVS existing flow over written by new flow action is changed.

5.Delete the flow "TunnelOut_1056_2_fa:16:3e:3d:e8:a7"

URL: http://10.106.138.159:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:73384666687563/table/2/flow/TunnelOut_1056_2_fa:16:3e:3d:e8:a7

6.check the flow was removed in OVS.

[stack@control devstack]$ sudo ovs-ofctl -O openflow13 dump-flows br-int
OFPST_FLOW reply (OF1.3) (xid=0x2):

Note: No flows present in OVS.

7.check the datastore
URL: curl -v --user "admin":"admin" -H "Content-type: application/json" -X GET http://10.106.138.159:8080/restconf/config/opendaylight-inventory:nodes/ | python -m json.tool

{
"nodes": {
"node": [
{
"flow-node-inventory:table": [
{
"flow": [
{
"cookie": 103,
"cookie_mask": 255,
"flow-name": "UcastOut_1056_4_fa:16:3e:3d:e8:a7",
"hard-timeout": 1200,
"id": "UcastOut_1056_4_fa:16:3e:3d:e8:a7",
"idle-timeout": 3400,
"installHw": false,
"instructions": {
"instruction": [
{
"apply-actions": {
"action": [
{
"order": 0,
"output-action":

{ "max-length": 60, "output-node-connector": "openflow:181106886712112:4" }

}
]
},
"order": 0
}
]
},
"match": {
"ethernet-match": {
"ethernet-destination":

{ "address": "ff:ff:29:01:19:61" }

,
"ethernet-source":

{ "address": "00:00:00:11:23:ae" }

,
"ethernet-type":

{ "type": 2048 }

}
},
"priority": 2,
"strict": false,
"table_id": 2
}
],
"id": 2
}
],
"id": "openflow:73384666687563"
}
]
}
}

flow ID "UcastOut_1056_4_fa:16:3e:3d:e8:a7" is present in datastore but corresponding flow is missing in OVS.



 Comments   
Comment by balakrishnan k [ 02/Feb/17 ]

(In reply to balakrishnan k from comment #0)
> ODL version:BoronSR2
>
> issue scenario:
> Add flow(TunnelOut_1056_2_fa:16:3e:3d:e8:a7) with src MAC, dst MAC and
> action to physical port 1.
> create one moreflow(UcastOut_1056_4_fa:16:3e:3d:e8:a7) with same match
> condition and action to physical port 2.
> config datastore has to flows but OVS has only one flow.
> Now delete the flow "TunnelOut_1056_2_fa:16:3e:3d:e8:a7" ,
> flow "TunnelOut_1056_2_fa:16:3e:3d:e8:a7" removed in datastore OVS flow
> also remove.
> finally datastore has flow "UcastOut_1056_4_fa:16:3e:3d:e8:a7"
> corresponding flow is missing in OVS.
>
> step to reproduce the issue:
> 1.intall openflow plugin features and connect switch to controller.
> 2.create flow TunnelOut_1056_2_fa:16:3e:3d:e8:a7.
> URL:
> http://10.106.138.159:8181/restconf/config/opendaylight-inventory:nodes/node/
> openflow:73384666687563/table/2/flow/TunnelOut_1056_2_fa:16:3e:3d:e8:a7
>
> Req Body:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <flow xmlns="urn:opendaylight:flow:inventory">
> <strict>false</strict>
> <flow-name>TunnelOut_1056_2_fa:16:3e:3d:e8:a7</flow-name>
> <id>TunnelOut_1056_2_fa:16:3e:3d:e8:a7</id>
> <cookie_mask>255</cookie_mask>
> <cookie>103</cookie>
> <table_id>2</table_id>
> <priority>2</priority>
> <hard-timeout>1200</hard-timeout>
> <idle-timeout>3400</idle-timeout>
> <installHw>false</installHw>
> <instructions>
> <instruction>
> <order>0</order>
> <apply-actions>
> <action>
> <order>0</order>
> <output-action>
>
> <output-node-connector>openflow:181106886712112:2</output-node-connector>
> <max-length>60</max-length>
> </output-action>
> </action>
> </apply-actions>
> </instruction>
> </instructions>
> <match>
> <ethernet-match>
> <ethernet-type>
> <type>2048</type>
> </ethernet-type>
> <ethernet-destination>
> <address>ff:ff:29:01:19:61</address>
> </ethernet-destination>
> <ethernet-source>
> <address>00:00:00:11:23:ae</address>
> </ethernet-source>
> </ethernet-match>
> </match>
> </flow>
>
> 3.check the flow was added in OVS.
>
> sudo ovs-ofctl -O openflow13 dump-flows br-int
> OFPST_FLOW reply (OF1.3) (xid=0x2):
> cookie=0x67, duration=18.670s, table=2, n_packets=0, n_bytes=0,
> idle_timeout=3400, hard_timeout=1200,
> priority=2,ip,dl_src=00:00:00:11:23:ae,dl_dst=ff:ff:29:01:19:61
> actions=output:2
>
> 4.create flow UcastOut_1056_4_fa:16:3e:3d:e8:a7.
>
> URL:
> http://10.106.138.159:8181/restconf/config/opendaylight-inventory:nodes/node/
> openflow:73384666687563/table/2/flow/UcastOut_1056_4_fa:16:3e:3d:e8:a7
>
> Req Body:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <flow xmlns="urn:opendaylight:flow:inventory">
> <strict>false</strict>
> <flow-name>UcastOut_1056_4_fa:16:3e:3d:e8:a7</flow-name>
> <id>UcastOut_1056_4_fa:16:3e:3d:e8:a7</id>
> <cookie_mask>255</cookie_mask>
> <cookie>103</cookie>
> <table_id>2</table_id>
> <priority>2</priority>
> <hard-timeout>1200</hard-timeout>
> <idle-timeout>3400</idle-timeout>
> <installHw>false</installHw>
> <instructions>
> <instruction>
> <order>0</order>
> <apply-actions>
> <action>
> <order>0</order>
> <output-action>
>
> <output-node-connector>openflow:181106886712112:4</output-node-connector>
> <max-length>60</max-length>
> </output-action>
> </action>
> </apply-actions>
> </instruction>
> </instructions>
> <match>
> <ethernet-match>
> <ethernet-type>
> <type>2048</type>
> </ethernet-type>
> <ethernet-destination>
> <address>ff:ff:29:01:19:61</address>
> </ethernet-destination>
> <ethernet-source>
> <address>00:00:00:11:23:ae</address>
> </ethernet-source>
> </ethernet-match>
> </match>
> </flow>
>
> 4.check the flow was added in OVS.
>
> sudo ovs-ofctl -O openflow13 dump-flows br-int
> OFPST_FLOW reply (OF1.3) (xid=0x2):
> cookie=0x67, duration=18.670s, table=2, n_packets=0, n_bytes=0,
> idle_timeout=3400, hard_timeout=1200,
> priority=2,ip,dl_src=00:00:00:11:23:ae,dl_dst=ff:ff:29:01:19:61
> actions=output:4
>
> Note :only one flow is present in OVS existing flow over written by new flow
> action is changed.
>
> 5.Delete the flow "TunnelOut_1056_2_fa:16:3e:3d:e8:a7"
>
> URL:
> http://10.106.138.159:8181/restconf/config/opendaylight-inventory:nodes/node/
> openflow:73384666687563/table/2/flow/TunnelOut_1056_2_fa:16:3e:3d:e8:a7
>
> 6.check the flow was removed in OVS.
>
> [stack@control devstack]$ sudo ovs-ofctl -O openflow13 dump-flows br-int
> OFPST_FLOW reply (OF1.3) (xid=0x2):
>
> Note: No flows present in OVS.
>
> 7.check the datastore
> URL: curl -v --user "admin":"admin" -H "Content-type: application/json" -X
> GET http://10.106.138.159:8080/restconf/config/opendaylight-inventory:nodes/
> | python -m json.tool
>
> {
> "nodes": {
> "node": [
> {
> "flow-node-inventory:table": [
> {
> "flow": [
> {
> "cookie": 103,
> "cookie_mask": 255,
> "flow-name":
> "UcastOut_1056_4_fa:16:3e:3d:e8:a7",
> "hard-timeout": 1200,
> "id": "UcastOut_1056_4_fa:16:3e:3d:e8:a7",
> "idle-timeout": 3400,
> "installHw": false,
> "instructions": {
> "instruction": [
> {
> "apply-actions": {
> "action": [
> {
> "order": 0,
> "output-action":

{ > "max-length": 60, > > "output-node-connector": "openflow:181106886712112:4" > }

> }
> ]
> },
> "order": 0
> }
> ]
> },
> "match": {
> "ethernet-match": {
> "ethernet-destination":

{ > "address": "ff:ff:29:01:19:61" > }

,
> "ethernet-source":

{ > "address": "00:00:00:11:23:ae" > }

,
> "ethernet-type":

{ > "type": 2048 > }

> }
> },
> "priority": 2,
> "strict": false,
> "table_id": 2
> }
> ],
> "id": 2
> }
> ],
> "id": "openflow:73384666687563"
> }
> ]
> }
> }
>
> flow ID "UcastOut_1056_4_fa:16:3e:3d:e8:a7" is present in datastore but
> corresponding flow is missing in OVS.

Comment by balakrishnan k [ 02/Feb/17 ]

step 4 flow name was wrongly mentioned actual flow name is "UcastOut_1056_4_fa:16:3e:3d:e8:a7"

Comment by Tomas Slusny [ 24/Feb/17 ]

Flows are identified by match, priority and table, so when sent to OVS, it thinks that are basically same flows, because only difference in them is action, so what openflowplugin does is, that it sends first flow to device, then sends second flow, but this second flow will replace first flow.

Comment by Tomas Slusny [ 24/Feb/17 ]

So I think this can be closed then, because it is correct behaviour, right? Maybe it is a bit confusing to have both flows still in config tho.

Comment by Jozef Bacigal [ 05/Jun/17 ]

No response long time assume the bug was fixed. Closing

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