-
Bug
-
Resolution: Done
-
Medium
-
5.0.7, 4.0.8, 6.0.4
-
None
NetconfDeviceMount.onDeviceConnected() may fail with the following error when the NETCONF session connectivity is unstable:
17:19:45.062 ERROR [remote-connector-processing-executor-10] RuntimeException while executing runnable CallbackListener{org.opendaylight.netconf.client.mdsal.NetconfDevice$1@2a3ea741} with executor MoreExecutors.directExecutor() java.lang.IllegalStateException: Already initialized at com.google.common.base.Preconditions.checkState(Preconditions.java:512) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.spi.NetconfDeviceMount.onDeviceConnected(NetconfDeviceMount.java:64) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.spi.NetconfDeviceMount.onDeviceConnected(NetconfDeviceMount.java:57) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.spi.NetconfDeviceSalFacade.onDeviceConnected(NetconfDeviceSalFacade.java:57) ~[bundleFile:?] at org.opendaylight.netconf.topology.spi.NetconfTopologyDeviceSalFacade.onDeviceConnected(NetconfTopologyDeviceSalFacade.java:35) ~[bundleFile:?] at org.opendaylight.netconf.topology.spi.NetconfNodeHandler.onDeviceConnected(NetconfNodeHandler.java:203) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.spi.KeepaliveSalFacade.onDeviceConnected(KeepaliveSalFacade.java:143) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.NetconfDevice.handleSalInitializationSuccess(NetconfDevice.java:224) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.NetconfDevice$1.onSuccess(NetconfDevice.java:162) ~[bundleFile:?] at org.opendaylight.netconf.client.mdsal.NetconfDevice$1.onSuccess(NetconfDevice.java:159) ~[bundleFile:?] at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1133) ~[bundleFile:?] at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) ~[bundleFile:?] at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:1286) ~[bundleFile:?] at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1055) ~[bundleFile:?] at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:782) ~[bundleFile:?] at com.google.common.util.concurrent.AbstractTransformFuture$TransformFuture.setResult(AbstractTransformFuture.java:257) ~[bundleFile:?] at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:169) ~[bundleFile:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) ~[?:?]
This appears to happen when the NETCONF session is disconnected while schema setup is in progress but reconnected before schema setup is completed allowing propagation of the original session-up event to NetconfDeviceMount as well as the second session-up event triggered by reconnection. When NetconfDeviceMount.onDeviceConnecte() is called a second time this error gets thrown.
This error could be harmless in some cases but the session-up event shouldn't be propagated to other components if the corresponding event is not valid any more.