Send Shutdown message to Shard on ServerRemoved 38/32238/4
authorTom Pantelis <tpanteli@brocade.com>
Wed, 6 Jan 2016 13:24:33 +0000 (08:24 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 11 Jan 2016 19:10:55 +0000 (14:10 -0500)
commitffe27dc93dc6f6a190287164f10444f4f6838d59
tree953b3814a8032753df33f32fd41f6e75c48c1af7
parent37cbf86dd56fb1d79a817750951283e1ae688cf7
Send Shutdown message to Shard on ServerRemoved

Modified the ShardManager to send the Shutdown message to the Shard on
ServerRemoved. If the shard was the leader, this will trigger leadership
transfer.

I also made changes to propagate the appropriate error to the caller on
RemoveServerReply instead of always replying with success.

Added a test case in ClusterAdminRpcServiceTest for removing the leader.

Change-Id: I30d2a22f07c1003fad2aba68e4f2d1d2c9fe7eb3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardManagerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcServiceTest.java