Re: [openflowplugin-dev] Li vs He - TransactionId and Error notifications


omar.m.dyson@gmail.com
 

Hi Michal, 

I reproduced the same issue using OVS:

- Created an OVS fork that return an OFPERR_OFPBAC_TOO_MANY to all flowmods.
- openflowplugin is expected to refuse all flowmods because the switch send an error for every flowmod.
- openflowplugin return successful future

Here are the steps to reproduce :

1. Compile OVS

* clone forked branch
git clone -b branch-2.3 https://github.com/omardyson/ovs.git
* Install mininet to get dependencies
apt-get install mininet
* compile ovs :
cd ovs/
 ./configure --prefix=/usr --with-linux=/lib/modules/`uname -r`/build
make
make install
make modules_install
rmmod openvswitch
depmod -a
/etc/init.d/openvswitch-controller stop
update-rc.d openvswitch-controller disable
/etc/init.d/openvswitch-switch start

2. Setup a virtual switch:

ip tuntap add dev myeth1 mode tap
ip link set dev myeth1 up
ip tuntap add dev myeth2 mode tap
ip link set dev myeth2 up
ovs-vsctl add-br sw1 -- set Bridge sw1 other_config:datapath-id=0000000000000001 -- set-fail-mode sw1 secure -- add-port sw1 myeth1 -- set Interface myeth1 ofport_request=1 -- add-port sw1 myeth2 -- set Interface myeth2 ofport_request=2 -- set-controller sw1 tcp:127.0.0.1:6633 ptcp:6634 -- set bridge sw1 other-config:disable-in-band=true -- set bridge sw1 protocols=OpenFlow13

3. Send Flowmod. In wireshark you get an OF error, but openflowplugin Li report successful future.

Thanks





On 4 November 2015 at 14:42, omar dyson <omar.m.dyson@...> wrote:
Hi Michel,

You are right, this is what I'm expecting, but openflowplugin always report successful future even if the device return an Error

Here is a capture :

Thanks,






On 4 November 2015 at 14:30, Michal Rehak -X (mirehak - PANTHEON TECHNOLOGIES at Cisco) <mirehak@...> wrote:

Hi Omar,

in Li-design you get a future object but the transactionId is null there.

Reason is simple: you do not need it. If there is an error message related to your flow then you will get failed future containing that error in exception.

If your future is successful then the flow has been accepted by device (flow-mod was sent followed by barrier request + reply).


See:

https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:He_vs_Li_comparison



Regards,

Michal





From: openflowplugin-dev-bounces@... <openflowplugin-dev-bounces@...> on behalf of omar dyson <omar.m.dyson@...>
Sent: Wednesday, November 4, 2015 15:34
To: openflowplugin-dev@...; openflowjava-dev
Subject: [openflowplugin-dev] Li vs He - TransactionId and Error notifications
 
Hi all,

In Helium RPC future result returned Transaction Id, example :

Future<RpcResult<AddFlowOutput>> rpcResult= salFlowService.addFlow(addFlowInput);
     if (rpcResult.get().isSuccessful()) {
          TransactionId id = rpcResult.get().getResult().getTransactionId()
     }

In Lithium code the getResult() always return null. Is that normal? How to get the transaction Id?

Also, the NodeErrorListener does not return OF errors as it is the case with Helium code.

I'm I missing something?

Regards,
Dyson




Join z.archive.openflowjava-dev@lists.opendaylight.org to automatically receive all group messages.