Ask Your Question
0

flows in controller but not switch

asked 2014-11-05 16:18:19 -0700

whabeck gravatar image

On Helium release... I have successfully pushed a flow to the controller using Postman for Chrome and the PUT statement with XML. If I query the node (a physical Brocade MLX switch) with the following command I see the flow...

http://<switch ip="">:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:openflow:10195427357884416</switch>

However, when I use the switch CLI to view flows, I only see the default flows, not the one newly created. I have not been able to figure out why it is not pushing the flow to the switch.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2014-11-06 09:28:59 -0700

Moderators

What was the flow doing? Cause right now (or I don't know of a way) to see if the flow was rejected by the switch and it reply with a OFPET_FLOW_MOD_FAILED but as it doesn't break the yang validation it still is found in the "config" datastore. To see if it was installed correctly then it would be found in the operational datastore.

http://<switch ip="">:8181/restconf/operational/opendaylight-inventory:nodes/node/openflow:openflow:10195427357884416</switch>

But i would recommend getting a packet sniffer between OpenDaylight and the Brocade switch to see if the flow was rejected for a reason, also check any logs on the switch to see if it reports flow it rejected.

edit flag offensive delete publish link more

Comments

A common occurrence when messing with different flows and/or OF switches. Chris is right: debug with a pcap or switch logs. One gotcha for me is you have to now DELETE the flow in the config store. Another PUT using same URI but different data will not trigger a flow_mod to the switch.

jamoluhrsen ( 2014-11-06 09:41:28 -0700 )edit

Thank you. I will investigate both of these avenues. Is there a typo in what you stated above? It says that if I delete and then put a flow with different data, it will NOT trigger a flow_mod. Should this read that it will NOW trigger a flow_mod? If this is true... is this the way to do this for other flows until fixed ? ie. PUT flow, DELETE flow, PUT flow again with different data. If not a typo... then I don't really understand what you meant there..

whabeck ( 2014-11-06 09:48:46 -0700 )edit

I think what jamoluhrsen means is that you first have to delete the "old" flow (which was not pushed to the switch but is _still_ in config/operational store), before you put another flow with the same uri (id). If you put a new flow with the same uri/id without having first deleted the old one in the config store, the new one won't be pushed down to the switch, because the controller wouldn't recognized that there is a new flow with the same uri/id. So you always have first to delete the flow with id xy before pushing a new one with the same id xy. Hope this helps.

mawil ( 2014-11-06 13:40:35 -0700 )edit

+1 to what mawil says

jamoluhrsen ( 2014-11-06 15:18:20 -0700 )edit

Thanks for the clarification. That is what I thought was meant. Not seeing much yet in packet captures, but do see the following error in the switch logs: FLOW_MOD ERROR: Reason: If special port then cannot support multiple actions Only one action is being pushed and the port is configured as a simple, default OF port, so not sure the exact meaning. Still investigating.

whabeck ( 2014-11-06 15:25:53 -0700 )edit
0

answered 2017-02-13 00:50:11 -0700

KHALID gravatar image

Hi guys,

i have a relatively similar issue.

the flow i pushed is stored in the restconf only, i have been able to push it using POSTMAN and i got the 200 status message.

I searched on forums but couldn't find a way to move the flow to the operational state. is there a possible way after all ?

here is the configuration i used :

URL :

http://my-controller-address:8181/res...

METHOD : PUT

Headers :

Authorization Basic YWRtaW46YWRtaW4= Content-Type application/xml Accept application/xml

BODY

<flow xmlns="urn:opendaylight:flow:inventory"> <strict>false</strict> <instructions> <instruction> <order>0</order> <apply-actions> <action> <order>0</order> <output-action> <output-node-connector>2</output-node-connector> </output-action> </action> </apply-actions> </instruction> </instructions> <table_id>0</table_id> <id>1</id> <cookie_mask>255</cookie_mask> <match> <ethernet-match> <ethernet-destination>

MAC-PATCH-INT1
</ethernet-destination> <ethernet-source>
MAC-PATCH-INT2
</ethernet-source> </ethernet-match> </match> <hard-timeout>12</hard-timeout> <cookie>1</cookie> <idle-timeout>34</idle-timeout> <flow-name>L2-Flow</flow-name> <priority>2</priority> <barrier>false</barrier> </flow>

PS : the 2 MAC addresses in the BODY are for PATCH interfaces connecting 2 OVS bridges br1 and br2. they are already connected and tested . what i m trying to do here is adding a new flow between these 2 interfaces.

when i issue the command : ovs-ofctl dump-flows br1 or br2 i do not see that the flow i pushed above has been added.

I tried to push the flow using /rest/operational instead of /rest/config but i got the 405 : method not allowed : response code.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
2 followers

Stats

Asked: 2014-11-05 16:18:19 -0700

Seen: 1,277 times

Last updated: Feb 13