Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

flow using set-queue-action produces errors in karaf.log

Hi,

I have a Q defined as follows:

$ sudo ovs-vsctl set port "OFS1-eth1" qos=@newqos -- --id=@newqos create qos type=linux-htb queues:7=@newqueue -- --id=@newqueue create queue other-config:max-rate=7000000

I would like to use the above Q in a flow. I would like to do the equivalent of the following, but using the REST API.

$ sudo ovs-ofctl add-flow OFS1 "tcp,inport=1,nwsrc=10.0.0.1,nwdst=10.0.0.4,tpdst=80 actions=set_queue:7,2"

$ sudo ovs-ofctl dump-flows OFS1 | grep queue cookie=0x0, duration=5.933s, table=0, npackets=0, nbytes=0, idleage=5, tcp,inport=1,nwsrc=10.0.0.1,nwdst=10.0.0.4,tpdst=80 actions=setqueue:7,output:2

My REST API call

$ curl -u admin:admin -X PUT -H 'Content-Type: application/json' -d

'{"flow":{"flowname":"web1","id":"web1","installHw":"true","tableid":"0","match":{"in-port":"openflow :1:1","ethernet-match":{"ethernet-type":{"type":"0x800"}},"ip-match":{"ip-protocol":"6"},"ipv4-source" :"10.0.0.1/32","ipv4-destination":"10.0.0.4/32","tcp-destination-port":"80"},"instructions":{"instruction" :[{"apply-actions":{"action":[{"output-action":{"output-node-connector":"openflow:1:2"},"order":"1"} ,{"set-queue-action":{"queue":"newqueue","queue-id":"7"},"order":"0"}]},"order":"0"}]}}}' 'http://localhost:8181/restconf/config/opendaylight-inventory:nodes/node/op enflow:1/flow-node-inventory:table/0/flow/web1'

This succeeds in storing the flow in config store, but doesn't get into operational/switch.

I see the following in karaf.log

at java.lang.Thread.run(Thread.java:745)[:1.8.060] 2015-08-27 10:48:24,739 | WARN | entLoopGroup-8-2 | OFEncoder | 250 - org.opendaylight.openflowjava.openflow-protocol-impl - 0.6.0.Lithium | Message serialization failed java.lang.IllegalStateException: Serializer for key: msgVersion: 1 objectType: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action action type: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetQueueCase experimenterID: null was not found - please verify that you are using correct message combination (e.g. OF v1.0 message to OF v1.0 device) at org.opendaylight.openflowjava.protocol.impl.serialization.SerializerRegistryImpl.getSerializer(SerializerRegistryImpl.java:69)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.util.ListSerializer.serializeList(ListSerializer.java:41)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10FlowModInputMessageFactory.serialize(OF10FlowModInputMessageFactory.java:52)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.serialization.factories.OF10FlowModInputMessageFactory.serialize(OF10FlowModInputMessageFactory.java:31)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.serialization.SerializationFactory.messageToBuffer(SerializationFactory.java:35)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:46)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.core.OFEncoder.encode(OFEncoder.java:29)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)[161:io.netty.codec:4.0.26.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:705)[135:io.netty.transport:4.0.26.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:763)[135:io.netty.transport:4.0.26.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:698)[135:io.netty.transport:4.0.26.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:684)[135:io.netty.transport:4.0.26.Final] at io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:940)[135:io.netty.transport:4.0.26.Final] at io.netty.channel.AbstractChannel.write(AbstractChannel.java:234)[135:io.netty.transport:4.0.26.Final] at org.opendaylight.openflowjava.protocol.impl.core.connection.ChannelOutboundQueue.flush(ChannelOutboundQueue.java:188)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.core.connection.ChannelOutboundQueue.access$000(ChannelOutboundQueue.java:37)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at org.opendaylight.openflowjava.protocol.impl.core.connection.ChannelOutboundQueue$1.run(ChannelOutboundQueue.java:81)[250:org.opendaylight.openflowjava.openflow-protocol-impl:0.6.0.Lithium] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:328)[136:io.netty.common:4.0.26.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:350)[135:io.netty.transport:4.0.26.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:111)[136:io.netty.common:4.0.26.Final] at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)[136:io.netty.common:4.0.26.Final] at java.lang.Thread.run(Thread.java:745)[:1.8.060]

Any idea how to make my REST call to work? Do I need to specify additional parameters?

My setup is Ubuntu 14.04LTS, ODL Lithium, mininet 1 switch & 4 nodes. The problem also occurs on Lithium-SR1.

Really appreciate any help resolving this.