Bug 8152: Transaction is already opened 66/55866/2
authorAndrej Mak <andrej.mak@pantheon.tech>
Wed, 19 Apr 2017 06:12:36 +0000 (08:12 +0200)
committerAndrej Mak <andrej.mak@pantheon.tech>
Mon, 24 Apr 2017 08:10:12 +0000 (08:10 +0000)
commit1e5911978e996c0e3d8d05e792f1422e39244e9d
tree621d09d4e56018ae804776c73cd1a37075d81142
parentd71981533c949a1febcdfceae15da78c330e4827
Bug 8152: Transaction is already opened

This issue happens, when for some reason transaction
submit or cancel message isn't delivered to master
node. With current implementation, only one device
transaction can be opened at the time, so submit or
cancel delivery failure will lock device forever.

To prevent this, this patch introduces write trancaction
idle timeout. Write transaction actor will be stopped
and its device transaction cancelled, when no message
is received for given time. Cancellation unlocks device,
so mountpouint is usable again.

Change-Id: I37bef30038cf6fd10fa5149a3fa949540ac16eab
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
(cherry picked from commit 95dc1455a7303eac56c755d01a37ca1f203543c0)
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/NetconfTopologyManager.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/impl/actors/WriteTransactionActor.java
netconf/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/utils/NetconfTopologySetup.java
netconf/netconf-topology-singleton/src/main/resources/org/opendaylight/blueprint/netconf-topology-singleton.xml
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/NetconfTopologyManagerTest.java
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/actors/WriteTransactionActorTest.java
netconf/netconf-topology-singleton/src/test/java/org/opendaylight/netconf/topology/singleton/impl/tx/WriteOnlyTransactionTest.java