Slave mount point registration hardening/resiliency 98/71898/6
authorTom Pantelis <tompantelis@gmail.com>
Thu, 10 May 2018 01:38:01 +0000 (21:38 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Thu, 10 May 2018 23:18:37 +0000 (19:18 -0400)
commitd682d29c57e64070078813dd1e70883a4ba258ee
tree4c9b65fe2adfbb2e4fa489a9f7b74fbf01192199
parent5defe99f336b51d4e96473aff6de4b9e6af8cb34
Slave mount point registration hardening/resiliency

- 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: I31c2d6584d56cb87c1b266565bc4b6f4a48ff303
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]