Ask Your Question

Adding flow via RestAPI

asked 2015-04-03 10:59:45 -0700

suren2015 gravatar image

Hi, I am using Helium-SR3 realse. when using the rest API to PUT flows, I can see it works for 2-3 flows and after that even if the REST API succeeds, comes back 200OK, no flow is added any more. I have to restart the Helium Instance again for it work for another 2-3 flows and stop. When logging at the log:tail, I do not see any error. Has anyone seen this before ?? How do I debug this??

thanks Surendra

edit retag flag offensive close merge delete


In those flows do you have a manching rulw for source or dest IP?

Nuno ( 2015-04-04 13:32:56 -0700 )edit

Thanks Nuno. No the flows only having ethernet header matching.

suren2015 ( 2015-04-04 20:16:28 -0700 )edit

If the flows are not and the switch and the you have a 200 OK response this usually means that there is a parameter that somewhere in the middle is being rejected and because of that the flow is not installed on the switch. Usually it is the IP address that doesn't have a mask, in this case is some other parameter in my opinion.

Nuno ( 2015-04-05 12:58:01 -0700 )edit

I see. However, I am keeping the flow same and when restart the opendaylight instance, the flow will be installed, Only to be stopped again after 2-3 flows push.

suren2015 ( 2015-04-06 10:36:51 -0700 )edit

The flows are different ? They have the same ID ?

Nuno ( 2015-04-06 14:06:22 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-03 14:41:24 -0700


To debug flow issue i highly recommend looking at your switch log message to see if it rejecting the flow, and also looking at the packet dump between the switch and ODL, with a tool like wireshark to tcpdump.

You could try to set the log level to Debug or trace for the openflowplugin, openflowjava modules to see if there an error there, but 9 times out of ten i see it cause of a reject message from the switch cause that flow you're adding isn't supported.

edit flag offensive delete publish link more


Thanks Chris, Yes I tried looking at the logs of the switch as well as tcpdump on both Controller host and Switch host and I see no traffic initiated as a result of API. It looks like the request does not even reach the openflow plugin. I changed the log level to ALL and I see debug messages, but result of the API invocation does not generate any debug message either.When I do the DELETE of the flow and then ADD the flow, it appears to work even for more than 3 flows but then eventually stop working after 10+ flows.The flows being added are active for 60 secs and then they expire.

suren2015 ( 2015-04-04 20:15:38 -0700 )edit

Make sure your flows you're pushing don't have an idle or hard timeout set with them, lots of the examples have idle and hard timeoute

Chris O'Shea ( 2015-04-05 03:08:43 -0700 )edit

Hi Chris, I even tried pushing the flow without these timeouts and flow insertion still failed. Poking around the log, in karaf.log I see this this errror even though Nodes are there. Caused by: Node /(urn:opendaylight:inventory?revision=2013-08-19)nodes/node/node[{(urn:opendaylight:inventory?revision=2013-08-19)id=openflow:278987128424}]/AugmentationIdentifier{childNames=[(urn:opendaylight:flow:inventory?revision=2013-08-19)manufacturer, (urn:opendaylight:flow:inventory?revision=2013-08-19)hardware, (urn:opendaylight:flow:inventory?revision=2013-08-19)software, (urn:opendaylight:flow:inventory?revision=2013-08-19)serial-number, (urn:opendaylight:flow:inventory?revision=2013-08-19)description, (urn:opendaylight:flow:inventory?revision=2013-08-19)meter,

suren2015 ( 2015-04-07 11:25:58 -0700 )edit

Since can not copy big message, this message precedes the error in my previous comment. 2015-04-03 18:43:10,371 | WARN | WriteTxCommit-0 | DOMDataCommitCoordinatorImpl | 157 - org.opendaylight.controller.sal-broker-impl - 1.1.3.Helium-SR3 | Tx: DOM-85 Error during phase CAN_COMMIT, starting Abort TransactionCommitFailedException{message=Data did not pass validation., errorList=[RpcError [message=Data did not pass validation., severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, Node /(urn:opendaylight:inventory?revision=2013-08-19)nodes/node/node[{(urn:opendaylight:inventory?revision=2013-08-19)id=openflow:278987128424}]/AugmentationIdentifier{childNames=[(urn:opendaylight:flow:inventory?revision=2013-08-19)manufacturer, (urn:opendaylight:flow:inventory?revision=2013-08-19)hardware, (urn:opendaylight:flow:inventory?revision=2013-08-19)software, (u

suren2015 ( 2015-04-07 11:27:07 -0700 )edit

Can you edit your main questions with a copy of the flow you're trying to push?

Chris O'Shea ( 2015-04-07 15:43:59 -0700 )edit
Login/Signup to Answer


Asked: 2015-04-03 10:59:45 -0700

Seen: 386 times

Last updated: Apr 03 '15