-
Story
-
Resolution: Done
-
Medium
-
None
-
None
The error log "addSwitch: Error reading external routers" and exception bewlo come out on the first switch connected and before any tests have ran. This is from the patch below introduced recently. I believe the code is also broken because the switchWeightsMap is initialized before the exception, so later the scheduleRouters never happens.
https://git.opendaylight.org/gerrit/73820
2018-07-23T12:19:10,038 | INFO | opendaylight-cluster-data-akka.actor.default-dispatcher-4 | GuardedContextImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Starting RoleContextImpl[NEW] service for node openflow:31062000848326 2018-07-23T12:19:10,041 | INFO | opendaylight-cluster-data-akka.actor.default-dispatcher-4 | SalRoleServiceImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | SetRole called with input:SetRoleInput [_controllerRole=BECOMEMASTER, _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:31062000848326]]]]}], augmentation=[]] 2018-07-23T12:19:10,042 | INFO | opendaylight-cluster-data-akka.actor.default-dispatcher-4 | SalRoleServiceImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Requesting state change to BECOMEMASTER 2018-07-23T12:19:10,042 | INFO | opendaylight-cluster-data-akka.actor.default-dispatcher-4 | SalRoleServiceImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | RoleChangeTask called on device:openflow:31062000848326 OFPRole:BECOMEMASTER 2018-07-23T12:19:10,042 | INFO | opendaylight-cluster-data-akka.actor.default-dispatcher-4 | RoleService | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | getGenerationIdFromDevice called for device: openflow:31062000848326 2018-07-23T12:19:10,049 | INFO | opendaylight-cluster-data-akka.actor.default-dispatcher-4 | ContextChainImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Started clustering services for node openflow:31062000848326 2018-07-23T12:19:10,050 | INFO | epollEventLoopGroup-9-1 | RoleService | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | submitRoleChange called for device:Uri [_value=openflow:31062000848326], role:BECOMEMASTER 2018-07-23T12:19:10,052 | INFO | epollEventLoopGroup-9-1 | RoleService | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | submitRoleChange onSuccess for device:Uri [_value=openflow:31062000848326], role:BECOMEMASTER 2018-07-23T12:19:10,057 | INFO | epollEventLoopGroup-9-1 | FlowNodeReconciliationImpl | 377 - org.opendaylight.openflowplugin.applications.forwardingrules-manager - 0.6.3 | Triggering reconciliation for device NodeKey [_id=Uri [_value=openflow:31062000848326]] 2018-07-23T12:19:10,061 | INFO | epollEventLoopGroup-9-1 | ContextChainHolderImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Device openflow:31062000848326 connection is enabled by reconciliation framework. 2018-07-23T12:19:10,087 | INFO | epollEventLoopGroup-9-1 | ContextChainImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Device openflow:31062000848326 is able to work as master. 2018-07-23T12:19:10,090 | INFO | epollEventLoopGroup-9-1 | ContextChainHolderImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Role MASTER was granted to device openflow:31062000848326 2018-07-23T12:19:10,092 | INFO | pool-234-thread-1 | SnatNodeEventListener | 361 - org.opendaylight.netvirt.natservice-impl - 0.6.3 | Dpn added 31062000848326 2018-07-23T12:19:10,094 | INFO | pool-234-thread-1 | WeightedCentralizedSwitchScheduler | 361 - org.opendaylight.netvirt.natservice-impl - 0.6.3 | addSwitch: Adding 31062000848326 dpnId to switchWeightsMap 2018-07-23T12:19:10,094 | INFO | org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node_AsyncClusteredDataTreeChangeListenerBase-DataTreeChangeHandler-0 | NodeConnectorStatsImpl | 263 - org.opendaylight.genius.interfacemanager-impl - 0.4.3 | Port statistics is turned off 2018-07-23T12:19:10,099 | INFO | epollEventLoopGroup-9-1 | DeviceManagerImpl | 385 - org.opendaylight.openflowplugin.impl - 0.6.3 | Publishing node added notification for Uri [_value=openflow:31062000848326] 2018-07-23T12:19:10,100 | INFO | org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode_AsyncDataTreeChangeListenerBase-DataTreeChangeHandler-0 | AclNodeListener | 342 - org.opendaylight.netvirt.aclservice-impl - 0.6.3 | Received ACL node [31062000848326] add event 2018-07-23T12:19:10,102 | ERROR | pool-234-thread-1 | WeightedCentralizedSwitchScheduler | 361 - org.opendaylight.netvirt.natservice-impl - 0.6.3 | addSwitch: Error reading external routers org.opendaylight.genius.datastoreutils.ExpectedDataObjectNotFoundException: Expected to find data in CONFIGURATION at InstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ExtRouters, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ExtRouters]}, but there was none at org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker.syncRead(SingleTransactionDataBroker.java:117) ~[269:org.opendaylight.genius.mdsalutil-api:0.4.3] at org.opendaylight.netvirt.natservice.ha.WeightedCentralizedSwitchScheduler.addSwitch(WeightedCentralizedSwitchScheduler.java:190) ~[?:?] at org.opendaylight.netvirt.natservice.ha.SnatNodeEventListener.add(SnatNodeEventListener.java:67) ~[?:?] at org.opendaylight.netvirt.natservice.ha.SnatNodeEventListener.add(SnatNodeEventListener.java:33) ~[?:?] at org.opendaylight.serviceutils.tools.mdsal.listener.DataTreeChangeListenerActions.add(DataTreeChangeListenerActions.java:86) ~[412:org.opendaylight.serviceutils.tools-api:0.1.3] at org.opendaylight.serviceutils.tools.mdsal.listener.DataTreeChangeListenerActions.onDataTreeChanged(DataTreeChangeListenerActions.java:65) ~[412:org.opendaylight.serviceutils.tools-api:0.1.3] at org.opendaylight.serviceutils.tools.mdsal.listener.AbstractClusteredAsyncDataTreeChangeListener.lambda$onDataTreeChanged$0(AbstractClusteredAsyncDataTreeChangeListener.java:62) ~[412:org.opendaylight.serviceutils.tools-api:0.1.3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?]