Bug 3041 - Meter and Meter Config messages not sent when controller starts after... 37/22637/2
authorAnil Vishnoi <vishnoianil@gmail.com>
Sun, 7 Jun 2015 11:31:06 +0000 (17:01 +0530)
committerAnil Vishnoi <vishnoianil@gmail.com>
Tue, 16 Jun 2015 13:57:25 +0000 (13:57 +0000)
commit5072226eb565123f2e8ee09fb2c807f6b0b58ee2
treef2567e36b21ac7dcd777e0bbcf2a3b83ca544ddb
parent7a226a870f147fa41d6c64acdacb59fbe98acd50
Bug 3041 - Meter and Meter Config messages not sent when controller starts after the switch

Openflow plugin explictly sends group/meter features statistics request
after successful switch handshake to the controller. Statistics-manager
receives multipart reply and ignores it, because it only process response
for the request sent by itself. So it does not make sense to send these
request from plugin.
Statistics manager also sends meter/group feature multipart request when
it's get notified that new node is added to the inventory. In case where
it gets the response immdiately from switch, sometime it creates race
condition where statistics manager don't find the transaction-id of the
request in the cache for which it received the response. This race condition
occures  because statistics manager store the key in cache once request send
operation finishes successfully in asyn manner. Processing the group/meter
response for the request send by plugin causing the reordering of the event
so that statistics processing happens before it adds transaction-id to the
cache. This race condition make statistics manager believe that the request
was not send by it and so it does not update the meter statistics capability
of the node and hence it stops sending the meter stats.

Patch 2 : Fixed unit test - plugin don't send meter/group feature request
now, so two less events.
Patch 3 : Fixed integration test for stable/lithium and master

Change-Id: I15fb58b8f9118f94d1a4154a2662972f69f938a0
Signed-off-by: Anil Vishnoi <vishnoianil@gmail.com>
openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/OFPluginFlowTest.java
openflowplugin-it/src/test/java/org/opendaylight/openflowplugin/openflow/md/it/ScenarioFactory.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java
openflowplugin/src/test/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImplTest.java