[NETCONF-1173] NetconfDeviceMount "Already initialized" error Created: 02/Oct/23  Updated: 10/Nov/23  Resolved: 10/Nov/23

Status: Resolved
Project: netconf
Component/s: netconf-client-mdsal
Affects Version/s: 5.0.7, 4.0.8, 6.0.4
Fix Version/s: 7.0.0, 4.0.9, 6.0.5, 5.0.10

Type: Bug Priority: Medium
Reporter: Sangwook Ha Assignee: Sangwook Ha
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.


Generated at Wed Feb 07 20:16:51 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.