Slave mount point registration hardening/resiliency 33/72333/1
authorTom Pantelis <tompantelis@gmail.com>
Thu, 10 May 2018 01:38:01 +0000 (21:38 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Sat, 26 May 2018 12:04:49 +0000 (08:04 -0400)
commitc39727c85da2f841adb3edf6dffb8ca01bf0ae5e
treeb2a6d62fd8cc22e369c8283ee3dfdb9ad43011c2
parent2abd70c2eff1e14ae4b7fd0bade61d8cd2141de6
Slave mount point registration hardening/resiliency

(cherry-picked from https://git.opendaylight.org/gerrit/#/c/71898/)

- It's possible for a message to the master to timeout in which
case the slave mount point doesn't get registered so add retries
for the AskForMasterMountPoint message in NetconfNodeManager and
schema resolution in NetconfNodeActor. The AskForMasterMountPoint
and RegisterMountPoint messages were changed to pass the
slave/master ActorRefs in order to send a success/failure reply to
the original caller.

- In NetconfNodeActor, preserve actor safety by executing
ListenableFuture callbacks via the actor's dispatch queue
(using executeInSelf) if the callback accesses actor state.

- Hardened synchronization in NetconfNodeManager and NetconfNodeManager.

- Added UTs for NetconfNodeManager to cover the slave mount point
registration scenarios.

- Added more logging where appropriate

Change-Id: I084115e5c8945670f1d99243ea6de947a757a9b2
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
13 files changed:
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeManager.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/NetconfTopologyContext.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/SlaveSalFacade.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/actors/NetconfNodeActor.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/messages/AskForMasterMountPoint.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/messages/NotMasterException.java [new file with mode: 0644]
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/messages/RegisterMountPoint.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/messages/YangTextSchemaSourceRequest.java
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeActorTest.java
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfNodeManagerTest.java [new file with mode: 0644]
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfTopologyManagerTest.java
netconf/netconf-topology-singleton/src/test/resources/application.conf [new file with mode: 0644]
netconf/netconf-topology-singleton/src/test/resources/simplelogger.properties [new file with mode: 0644]