[OPNFLWPLUG-605] He: Failed to issue flow stats; get-flow-statistics-from-flow-table Created: 25/Jan/16 Updated: 27/Sep/21 Resolved: 12/Dec/17 |
|
| Status: | Verified |
| Project: | OpenFlowPlugin |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Hideyuki Tai | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 5090 |
| Description |
|
What I used Source code: stable/beryllium of 01/25/2016 What I happened Just after the OpenFlow plugin got connected with an OpenFlow 1.0 switch, VTN Manager called the RPC "get-flow-statistics-from-flow-table" to get all flow entries in a flow table of the switch. 2016-01-25 15:24:00,423 | ERROR | er Task Thread-0 | StatsReaderService | 178 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | get-flow-stats: Caught an exception: canceled=false, input=GetFlowStatisticsFromFlowTableInput [_cookie=FlowCookie [_value=9175521290813964288], _cookieMask=FlowCookie [_value=18446462598732840960], _node=NodeRef [_value=KeyedInstanceIdentifier {targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:2]]]]}], _tableId=0, augmentation=[]] at com.google.common.util.concurrent.AbstractFuture$Sync.getValue(AbstractFuture.java:299)[54:com.google.guava:18.0.0] 2016-01-25 15:24:00,424 | ERROR | er Task Thread-0 | StatsReaderService | 178 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | Failed to issue flow stats RPC: get-flow-stats at org.opendaylight.vtn.manager.internal.util.concurrent.AbstractVTNFuture.getException(AbstractVTNFuture.java:75)[178:org.opendaylight.vtn.manager.implementation:0.4.0.SNAPSHOT] The issue happened in the CSIT for VTN project. The issue does not happen always. |
| Comments |
| Comment by Hideyuki Tai [ 25/Jan/16 ] |
|
After VTN Manager failed to issue flow stats RPC, following operations like installing flow entries on the switch worked well. Therefore, we are thinking that the OpenFlow plugin sent a notification of the node addition on which VTN Manager called the RPC, before the OpenFlow plugin completed to register the RPC. |
| Comment by Anil Vishnoi [ 26/Jan/16 ] |
|
Hi Hideyuki, Can you try with this patch and see if it fixes your issue. https://git.opendaylight.org/gerrit/#/c/33529/3 Thanks |
| Comment by Hideyuki Tai [ 27/Jan/16 ] |
|
(In reply to Anil Vishnoi from comment #2) Hi Anil, Thank you for checking the issue, and creating the patch. When I repeatedly started up and shutdown the Mininet, I can observed the issue. 2016-01-26 11:54:20,002 | INFO | entLoopGroup-9-2 | ConnectionAdapterImpl | 159 - org.opendaylight.openflowjava.openflow-protocol-impl - 0.7.0.SNAPSHOT | Hello received / branch ]} 2016-01-26 11:54:20,009 | INFO | lt-dispatcher-21 | VTNInventoryManager | 175 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | Port has been created: {id=openflow:1:2, name=s1-eth2, enabled=true, cost=1000, links=none}2016-01-26 11:54:20,011 | INFO | ult-dispatcher-2 | OfEntityManager | 162 - org.opendaylight.openflowplugin - 0.2.0.SNAPSHOT | registerRoutedRPCForSwitch: Registered routed rpc for ModelDrivenSwitch openflow:1 ], _tableId=0, augmentation=[]] (snip) 2016-01-26 11:54:20,013 | ERROR | er Task Thread-0 | StatsReaderService | 175 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | Failed to issue flow stats RPC: get-flow-stats Please note that VTN Manager calls the RPC for a node, after the VTN Manager gets the notification of the addition the node. |
| Comment by Hideyuki Tai [ 27/Jan/16 ] |
|
Attachment karaf.log has been added with description: Karaf log file on a failure case |
| Comment by Hideyuki Tai [ 29/Jan/16 ] |
|
The following patch was merged for the bug. I will test the latest artifacts of the stable/beryllium branch to see if the patch fixes the bug or not. |
| Comment by Hideyuki Tai [ 29/Jan/16 ] |
|
Even after the following patch is applied, the same issue still happens. I observed that the issue occurred in the CSIT job for Beryllium on Jan 29. Also, when I tested the Beryllium RC1, I faced the same issue. |
| Comment by Anil Vishnoi [ 29/Jan/16 ] |
|
Hi Hideyuki, Looks like you are sending your rpc request before openflowplugin publishes the nodeAdded event. Looking at the log, it looks like VTN create the bridge and once it's done with creating the bridge it sends the stats request to get the stats, but it does not really check the in inventory data store to make sure that the node (in this case openflow:2) is added by openflowplugin or not. Before the clustering implementation, openflowplugin was not setting any role for the switch, but with clustering implementation, it first set the role and it role setting is successful, it notifies application about the node addition. So i think if you put check in your code to see if the node is in inventory or not, that will solve the issue. |
| Comment by Hideyuki Tai [ 01/Feb/16 ] |
|
(In reply to Anil Vishnoi from comment #7) Hi Anil, Could you tell me when the OFP-He write a new node data (OpenFlow switch) into the MD-SAL data store? [Longer version of this question] I think I slightly misunderstood the behavior of the VTN features and OpenFlow Plugin Helium design. Could you check if the current my understanding of the OFP-He is correct? Step 1. OFP-He detects a new session with an OpenFlow switch. Is the above my understanding correct? The VTN feature registers its DataChangeListener for the opendaylight-inventory. |
| Comment by Hideyuki Tai [ 02/Feb/16 ] |
|
I had a conversation about the bug with Anil. The information what I got from his is as follows: [This is what happens] 1) openflowplugin get connection request |
| Comment by Hideyuki Tai [ 02/Feb/16 ] |
|
Attachment karaf.log.1 has been added with description: Logs on the issue in which DEBUG logs for the inventory-manager was enabled |
| Comment by Hideyuki Tai [ 02/Feb/16 ] |
|
Here is one additional observation from my side. I enabled DEBUG logs of "org.opendaylight.openflowplugin.applications.inventory.manager", and reproduced the problem. I've found out that the inventory-manager received the "Node connector updated" notification right after the OFP-He registered controller for the ownership for the switch. Following that "Node connector updated" notification in the inventory-manager, the VTN feature recived the notification of data changes on the opendaylight-inventory, and the VTN feature called the "get-stats-..." RPC for the switch. Though the inventory-manager received the "Node updated" notification after the OFP-He registered its RPC for the switch. 2016-02-02 08:23:44,173 | INFO | entLoopGroup-9-4 | ConnectionAdapterImpl | 162 - org.opendaylight.openflowjava.openflow-protocol-impl - 0.7.0.SNAPSHOT | Hello received / branch . . . . ]} 2016-02-02 08:23:44,178 | TRACE | ult-dispatcher-3 | VTNInventoryManager | 178 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | Delivering port event: id=openflow:2:3, type=CREATED (snip) 2016-02-02 08:23:44,179 | ERROR | er Task Thread-0 | StatsReaderService | 178 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | get-flow-stats: Caught an exception: canceled=false, input=GetFlowStatisticsFromFlowTableInput [_cookie=FlowCookie [_value=9175521290813964288], _cookieMask=FlowCookie [_value=18446462598732840960], _node=NodeRef [_value=KeyedInstanceIdentifier {targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:2]]]]}], _tableId=0, augmentation=[]] (snip) 2016-02-02 08:23:44,180 | ERROR | er Task Thread-0 | StatsReaderService | 178 - org.opendaylight.vtn.manager.implementation - 0.4.0.SNAPSHOT | Failed to issue flow stats RPC: get-flow-stats (snip) 2016-02-02 08:23:44,181 | INFO | lt-dispatcher-26 | OfEntityManager | 165 - org.opendaylight.openflowplugin - 0.2.0.SNAPSHOT | registerRoutedRPCForSwitch: Registered routed rpc for ModelDrivenSwitch openflow:2 2016-02-02 08:23:44,182 | DEBUG | pool-28-thread-1 | NodeChangeCommiter | 169 - org.opendaylight.openflowplugin.applications.inventory-manager - 0.2.0.SNAPSHOT | Node updated notification received,KeyedInstanceIdentifier {targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri [_value=openflow:2]]]]}2016-02-02 08:23:44,182 | DEBUG | nventoryProvider | FlowCapableInventoryProvider | 169 - org.opendaylight.openflowplugin.applications.inventory-manager - 0.2.0.SNAPSHOT | Processed 1 operations, submitting transaction DOM-CHAIN-2-1545 |
| Comment by Hideyuki Tai [ 03/Feb/16 ] |
|
One observation. It seems to me that the postHandshakeBasic method of ConnectionConductorImpl class is related to this bug. In the openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java: 476 protected void postHandshakeBasic(GetFeaturesOutput featureOutput, |
| Comment by Anil Vishnoi [ 12/Dec/17 ] |
|
No activity on this bug from last 2 years, also Helium plugin design is deprecated now. Please reopen the bug if you see the issue with carbon/nitrogen/oxygen branches. |