controller.git
6 years agoRemove NormalizedNodeStreamReader 42/34842/2
Robert Varga [Wed, 17 Feb 2016 14:47:20 +0000 (15:47 +0100)]
Remove NormalizedNodeStreamReader

This class has been superseded by NormalizedNodeDataInput, remove it.

Change-Id: I11c915f4aff6ca217e096c42ba1115043a99a3ab
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoFollow-up to protobuff deprecation 38/34638/11
Robert Varga [Sun, 14 Feb 2016 22:34:49 +0000 (23:34 +0100)]
Follow-up to protobuff deprecation

Mark elements dealing with compatibility as @Deprecated. Reduces the
warning surface significantly.

Change-Id: I969c7b185cf6fbf570fe4d4d0332cff60eb0e4ca
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoRemove unused variant of newShardProps() 24/34624/12
Robert Varga [Sun, 14 Feb 2016 02:22:11 +0000 (03:22 +0100)]
Remove unused variant of newShardProps()

This signature is unused, remove it to squash an eclipse warning.

Change-Id: I804961bfded0734a02fd00fb69979bb8b5b8feab
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoAdd SendInstallSnapshot javadoc 18/34618/12
Robert Varga [Sun, 14 Feb 2016 00:31:46 +0000 (01:31 +0100)]
Add SendInstallSnapshot javadoc

First cut at describing mechanics. Also make the class final and
annonate nullness.

Change-Id: I94119ab818713110dfab199b0e3f9e9608cfd583
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoClean AbstractServerChangeReply up 22/34622/9
Robert Varga [Sun, 14 Feb 2016 01:32:58 +0000 (02:32 +0100)]
Clean AbstractServerChangeReply up

This is an abstract base class, make it abstract and non-instantiable
from outside of the world. It introduces public API, hence we cannot
hide it.

Also switch to using MoreObjects.ToStringHelper, as that allows us to
unify toString().

Change-Id: I21bdd4d0815a50393519414449c7e7eb7179b077
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoBug 4627: Fix premature RO tx cleanup 57/34757/1
Tom Pantelis [Tue, 16 Feb 2016 04:45:36 +0000 (23:45 -0500)]
Bug 4627: Fix premature RO tx cleanup

For the RO tx PhantomReference cleanup mechanism, modified
RemoteTransactionContextSupport to pass the front-end client
TransactionProxy instance as the referent to the
FinalizablePhantomReference. Previously we were passing the
RemoteTransactionContextSupport instance which is only reachable via
a hard reference until the primary shard actor is obtained and thus may
be eligible for GC while the TransactionProxy is still in use.

Change-Id: Ib2808b4ba8113a5722f9ee422434a89adaf775fe
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug 4823: Use tx commit timeout for BatchedModifications 98/34298/3
Tom Pantelis [Mon, 8 Feb 2016 21:50:23 +0000 (16:50 -0500)]
Bug 4823: Use tx commit timeout for BatchedModifications

When sending BatchedModifications messages to the shard we use the
general operation timeout which is 5 sec. We should instead use the
transaction commit timeout to be consistent with the other transaction
messages (ReadyLocalTransaction, CanCommitTransaction etc).

Change-Id: I26bead59c29ee198f677838c5adb3614e3795a04
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoMake RequestVoteReply final 21/34621/6
Robert Varga [Sun, 14 Feb 2016 00:44:39 +0000 (01:44 +0100)]
Make RequestVoteReply final

Concrete message, it should never be subclassed.

Change-Id: Ie48a8cace763e1184ab47990136c5e5db3d453cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoDocument RaftRPC 19/34619/5
Robert Varga [Sun, 14 Feb 2016 00:36:31 +0000 (01:36 +0100)]
Document RaftRPC

Add some basic javadocs.

Change-Id: I1cd1a37e3979c497705baf3a2b508c058f1022ec
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoTurn OperationState into an abstract class 17/34617/4
Robert Varga [Sun, 14 Feb 2016 00:06:03 +0000 (01:06 +0100)]
Turn OperationState into an abstract class

This is an internal state class, no need to make it an interface. This
should make for faster dispatch, as methods offsets in vtable are fixed.

Change-Id: I3438a17485104b43647c91b7c6272dad5862cbb9
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoTurn SendHeartBeat into a singleton 16/34616/4
Robert Varga [Sat, 13 Feb 2016 23:53:53 +0000 (00:53 +0100)]
Turn SendHeartBeat into a singleton

There is no additional data, turn it into a singleton.

Change-Id: I5d562d798d27ba80e2b4de31a16faae80a3eaad3
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoTurn LeaderTransitioning into a singleton 15/34615/4
Robert Varga [Sat, 13 Feb 2016 23:49:14 +0000 (00:49 +0100)]
Turn LeaderTransitioning into a singleton

The message does not carry any state and can be made a singleton.

Change-Id: Iadcbe0cb8de949dbc57240772bcfd9ddf23d42ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoHide IsolatedLeaderCheck message 14/34614/4
Robert Varga [Sat, 13 Feb 2016 23:44:36 +0000 (00:44 +0100)]
Hide IsolatedLeaderCheck message

IsolatedLeaderCheck is a Leader-internal implementation detail. Do not
publish it to the outside world. Since it does not carry any state, we
can replace it by a simple object instance.

Change-Id: I6f9061e8141f499c590fd079f6c57e39f8b022d2
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoMake FollowerInitialSyncUpStatus final 13/34613/4
Robert Varga [Sat, 13 Feb 2016 23:24:06 +0000 (00:24 +0100)]
Make FollowerInitialSyncUpStatus final

Change-Id: Ie39c26f077311e0ec5b9dd9b8734bdfabf26b581
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoTurn ElectionTimeout into a proper singleton 12/34612/4
Robert Varga [Sat, 13 Feb 2016 23:19:41 +0000 (00:19 +0100)]
Turn ElectionTimeout into a proper singleton

There is no need to instantiate this object multiple times. Turn it into
a singleton. Also add a bit of javadocs.

Change-Id: Ied90a43ec297409b8074875d305d7f74e1b37ce4
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoMake NOOP_CALLBACK internal constant 08/34608/5
Robert Varga [Sat, 13 Feb 2016 22:01:14 +0000 (23:01 +0100)]
Make NOOP_CALLBACK internal constant

There are no outside users, make this a proper final constant and hide
it.

Change-Id: I06638758787b3fd0994b5d51fb4f2b2e5718aa57
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoBUG-5247: notify listeners for entities which are not owned 79/34179/19
Robert Varga [Fri, 5 Feb 2016 17:45:40 +0000 (18:45 +0100)]
BUG-5247: notify listeners for entities which are not owned

Rather than broadcasting just the 'up' state, notify listeners about all
state we know of.

Change-Id: Iaae6db925a321aad420fa0ee8bdf8b56b5d2a29e
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoMake GetSnapshot final and add a link 07/34607/5
Robert Varga [Sat, 13 Feb 2016 21:32:40 +0000 (22:32 +0100)]
Make GetSnapshot final and add a link

With a private consructor, this class is really final. Also add a
Javadoc reference to the response message.

Change-Id: I2cf9cf7d4b750597ac2dc122ee9d6412831522bd
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoFix raw type warnings 56/34556/7
Robert Varga [Fri, 12 Feb 2016 12:28:25 +0000 (13:28 +0100)]
Fix raw type warnings

Fixes NodeWithValue and similar raw type warnings. Also imports
YangInstanceIdentifier inner interfaces for more readable code.

Change-Id: Iaff9e250fff26b0da70dd9f24d7ccc72121630e4
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoDeprecate InstallSnapshot protobuff messages 68/33768/6
Tom Pantelis [Wed, 27 Jan 2016 07:33:32 +0000 (02:33 -0500)]
Deprecate InstallSnapshot protobuff messages

Deprecated the associated InstallSnapshot protobuff message and
changed InstallSnapshot to Externalizable. Backwards compatibility
with pre-boron is maintained. Related code was modified accordingly.

Previously InstallSnapshot took a ByteString. I changed this to byte[]
to avoid the extra copy overhead with ByteString with converting to and
from byte[].

Change-Id: I532d062983e76e63c685e6df1d48e0ae38197a5c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoReduce output from DeadlockMonitor 61/34561/2
Tom Pantelis [Fri, 12 Feb 2016 14:56:46 +0000 (09:56 -0500)]
Reduce output from DeadlockMonitor

If a module doesn't finish after 5 sec, the DeadlockMonitor starts
logging warning messages. However it does this every second. CDS will
wait up to 90 sec for all shards to elect a leader so the
DeadlockMonitor produces a lot of output during this period. To reduce
the noise I changed the sleep to use WARN_AFTER_MILLIS so the message is
logged every 5 sec.

Change-Id: I63842075dee1fc6a4fc4e4200cc089e33a110e78
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove TransactionContext.supportsDirectCommit method 72/34472/2
Tom Pantelis [Wed, 10 Feb 2016 18:12:34 +0000 (13:12 -0500)]
Remove TransactionContext.supportsDirectCommit method

The supportsDirectCommit method was added for backwards compatibility
with pre-Lithium and thus can be removed to simplify the code. All the
current implementations return true.

Change-Id: I256e19b5c0b63a5371c70def72adc6c2a1427106
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoFix intermittent ShardTest failures 32/34632/2
Tom Pantelis [Sun, 14 Feb 2016 12:17:36 +0000 (07:17 -0500)]
Fix intermittent ShardTest failures

Some tests fail intermittenly due to modifying Shard state directly
instead of thru messages.

Change-Id: I704d6d23c1b2a47e78b3d8823a3136e921e9113b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoMake Shutdown message a proper singleton 06/34606/3
Robert Varga [Sat, 13 Feb 2016 21:27:47 +0000 (22:27 +0100)]
Make Shutdown message a proper singleton

It holds no state and thus can be readily reused.

Change-Id: I7aba9266a476ddb79f456ce66dd46697c2e5ddb5
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoCleanup and document FindLeaderReply 05/34605/4
Robert Varga [Sat, 13 Feb 2016 20:58:40 +0000 (21:58 +0100)]
Cleanup and document FindLeaderReply

Adds javadoc describing FindLeaderReply and makes getLeaderActor()
return an Optional<String> instead of null. Also eliminate switch log
errors via Logger, not println();

Change-Id: I7efc98b6e652d7e01192b9bb6e1bd4ad1c9d8b76
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoDocument FindLeader message 04/34604/3
Robert Varga [Sat, 13 Feb 2016 20:48:08 +0000 (21:48 +0100)]
Document FindLeader message

Add Javadoc documentation and turn the message into a proper singleton,
as it does not currently hold any data.

Change-Id: Ib696b32234f048c4a9c7abb7a9972a00118219e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoMake methods static 55/34555/2
Robert Varga [Fri, 12 Feb 2016 12:08:22 +0000 (13:08 +0100)]
Make methods static

These private methods can be made static, let's do that.

Change-Id: I275e465f3424ae87f7a2a5ddaaca1f09c5072685
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoFix intermittent LeaderTest/CandidateTest failures 44/34544/2
Tom Pantelis [Thu, 11 Feb 2016 08:24:53 +0000 (03:24 -0500)]
Fix intermittent LeaderTest/CandidateTest failures

The test cases in LeaderTest and CandidateTest have been failing
intermittently. A particular test in CandidateTest has recently started
failing fairly regularly on jenkins for some reason.

The common denominator is that an initial message to an actor isn't
received and goes to dead letters instead, even though the actor was
just created. This seems related to the use of ActorSelection in the raft
behavior classes, I suspect a timing issue where the underlying actor
isn't actually created/available yet via actorSelection. I had seen this
in the past and attempted to alleviate it by adding a verifyActorReady to
TestActorFactory to verify with retries that the actor can be obtained via
actorSelection.resolveOne. However it doesn't appear resolveOne works as
advertised or maybe a successful call doesn't mean a message will
succeed.

I changed verifyActorReady to send an Identify message to the
actorSelection and verify successful response. On my system LeaderTest
would usually fail within 30 test runs. After the change it ran
successfully 400 times.

Change-Id: I2da7d4a4d14c68810e87fc64b711b5c80608f5d7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoAdd raftVersion field to AppendEntriesReply 67/33767/6
Tom Pantelis [Tue, 26 Jan 2016 15:18:31 +0000 (10:18 -0500)]
Add raftVersion field to AppendEntriesReply

Added a raftVersion field to AppendEntriesReply and modified
AbstractLeader to store the raftVersion in the FollowerLogInformation.
This will enable sending the appropriate serialized version for
subsequent messages sent to the follower.

The raftVersion in the FollowerLogInformation is initialized to
0 (HELIUM_VERSION) so we assume the oldest version for backwards
compatibility until we get the first AppendEntriesReply with the
follower's actual version.

Since we're adding a new field to AppendEntriesReply this won't break
backwards compatibility as Java serialization handles that. The
raftVersion will be set to 0 if sent from a pre-boron version.

Change-Id: I4519c4f314674840f2578848b2888c3e8467dd21
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBUG-5247: Fix Optional.get() on absent return 24/34524/2
Robert Varga [Thu, 11 Feb 2016 23:41:25 +0000 (00:41 +0100)]
BUG-5247: Fix Optional.get() on absent return

The following exception is seen:

testCloseCandidateRegistrationInQuickSuccession(org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest)  Time elapsed: 3.158 sec  <<< ERROR!
java.lang.IllegalStateException: Optional.get() cannot be called on an absent value
    at com.google.common.base.Absent.get(Absent.java:47)
    at org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest.testCloseCandidateRegistrationInQuickSuccession(DistributedEntityOwnershipIntegrationTest.java:404)

Change-Id: I3765a05a332f4abba550177ae5516eb2644ea94d
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoBug 5153: Add timestamp to TransactionIdentifier 19/34019/4
Tom Pantelis [Wed, 3 Feb 2016 06:43:38 +0000 (01:43 -0500)]
Bug 5153: Add timestamp to TransactionIdentifier

TransactionIdentifiers are created locally but sent to the remote leader
so it's possible, after a restart, for the remote leader to see the same id
for 2 different txns since the local counter starts at 1. To alleviate
this I added a timestamp to TransactionIdentifier. I could've just used
a UUID but the counter is useful for debugging and a full UUID would
make the string version pretty long for logging. I think an additional
millisec timestamp is sufficient.

Change-Id: Iaabd3d25eb64dd14053f96336c48de90d4364678
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoMake private methods static 90/34390/3
Robert Varga [Wed, 10 Feb 2016 12:15:10 +0000 (13:15 +0100)]
Make private methods static

These methods do not touch object state, make them static.

Change-Id: I9d29719cee7737ea8c36fa2e8fe39d4e245dd68c
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoShardTestKit.waitUntilLeader() is static 89/34389/3
Robert Varga [Wed, 10 Feb 2016 12:15:40 +0000 (13:15 +0100)]
ShardTestKit.waitUntilLeader() is static

Make its callers invoke it in a static way, without an instance.

Change-Id: Ic444a74af5c714b9b3e49ebc61fc97cf24d59d71
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoFix raw reference 92/34392/5
Robert Varga [Wed, 10 Feb 2016 12:34:27 +0000 (13:34 +0100)]
Fix raw reference

Class is generic, add <?> to method declaration.

Change-Id: Iab1dc09d9bbda553d326a1efe4356ae804a568df
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoNodeWithValue is generic 91/34391/4
Robert Varga [Wed, 10 Feb 2016 12:26:35 +0000 (13:26 +0100)]
NodeWithValue is generic

Add diamond contructor to fix eclipse warnings.

Change-Id: Ib7c35f70103a9dcb3fc101b91642c3822a242acb
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoFix raw type warnings 93/34393/5
Robert Varga [Wed, 10 Feb 2016 12:34:52 +0000 (13:34 +0100)]
Fix raw type warnings

AtomicFieldReferenceUpdater with generic classes causes a type safety
warning. Add raw type suppressions.

Change-Id: I8e27af2532f7fbc84a0e81bb046ffae4a10b2228
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoUse a singleton instead of an ArrayList 81/34181/4
Robert Varga [Fri, 5 Feb 2016 15:45:18 +0000 (16:45 +0100)]
Use a singleton instead of an ArrayList

Does not force instantiation on a backing array, hence it is
simpler/faster.

Change-Id: I0ab8af0b298e67fd571d7c4be0be5fca20cafbb3
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoSimplify listener management 80/34180/3
Robert Varga [Fri, 5 Feb 2016 15:14:39 +0000 (16:14 +0100)]
Simplify listener management

Instead of passing local fields as arguments, access the field directly.

Change-Id: I209f55644f81722f806aaf448a8e09e2c608f7cf
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoFix Eclipse errors with Java 8/Scala 87/34387/2
Robert Varga [Wed, 10 Feb 2016 11:37:38 +0000 (12:37 +0100)]
Fix Eclipse errors with Java 8/Scala

This adds workarounds for ambiguous method error reported by Eclipse.
The issue is reported and analyzed at
https://bugs.eclipse.org/bugs/show_bug.cgi?id=468276. This patch adds
alternative use of methods which trigger the behavior.

Change-Id: If463d4567e3555efff8e11b39e8708d0e51838c1
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoRefactor VersionedExternalizableMessage messages 71/33871/2
Gary Wu [Tue, 2 Feb 2016 00:45:25 +0000 (16:45 -0800)]
Refactor VersionedExternalizableMessage messages

Refactor VersionedExternalizableMessage messages
to centralize version checking in toSerializable().

Change-Id: I6ad4477eb16e104ab801205842875efa164817af
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
6 years agoRemove deprecated Helium Payload methods 10/33510/7
Tom Pantelis [Sun, 24 Jan 2016 05:44:09 +0000 (00:44 -0500)]
Remove deprecated Helium Payload methods

Removed the deprecated encode/decode methods from Payload and its derived
classes.

Change-Id: I52beb2d3991efe9f3a7c2631b8682dc1f324e271
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoDeprecate CloseTransactionChain protobuff message 08/33508/7
Tom Pantelis [Sat, 23 Jan 2016 05:31:21 +0000 (00:31 -0500)]
Deprecate CloseTransactionChain protobuff message

Deprecate the associated CloseTransactionChain protobuff message and
change the message classes to extend VersionedExternalizableMessage.
Backwards compatibility with pre-boron is maintained. Related code was
modified accordingly.

The CloseTransactionChainReply message isn't used so it was removed.

Change-Id: I58d29eac9cb2f300f92dd4e5cb11484b215ddc48
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoPublic constants need to be final 64/34164/1
Robert Varga [Fri, 5 Feb 2016 14:45:29 +0000 (15:45 +0100)]
Public constants need to be final

Make constants really constant.

Change-Id: Iacca77288d0b53f578da367fd490ff69b4484a2a
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoJVM8: Remove PermSize and MaxPermSize options 25/34125/1
Lorand Jakab [Fri, 5 Feb 2016 08:47:12 +0000 (10:47 +0200)]
JVM8: Remove PermSize and MaxPermSize options

PermSize and MaxPermSize JVM options are not supported in Oracle Java 8.
Since Boron only supports Java 8, they no longer need to be set. This
avoids the following warning: "Java HotSpot(TM) 64-Bit Server VM
warning: ignoring option MaxPermSize=512m; support was removed in 8.0"

Change-Id: I9a8158113746db9a1edf5d7f62a3aaf24a652143
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
6 years agoChoose owner when all candidate registrations received. 94/33494/4
Moiz Raja [Fri, 15 Jan 2016 20:38:11 +0000 (12:38 -0800)]
Choose owner when all candidate registrations received.

In the Delayed Owner Selection Strategy we should not wait for
the timeout to occur when we have received the candidate
registrations for all the candidates possible in the system.

Change-Id: Ifcd1f376b050baf2e422e00bd4a93a4d9d3d6c45
Signed-off-by: Moiz Raja <moraja@cisco.com>
6 years agoAdd notification-dispatcher configuration for default akka.conf. 95/33495/5
Moiz Raja [Sat, 16 Jan 2016 02:13:56 +0000 (18:13 -0800)]
Add notification-dispatcher configuration for default akka.conf.

Change-Id: I9d4983b9d435f527738a84aa03904f23ec2237c1
Signed-off-by: Moiz Raja <moraja@cisco.com>
6 years agoWhen no candidates are present for an entity do not return EntityOwnershipState 93/33493/4
Moiz Raja [Fri, 8 Jan 2016 04:18:01 +0000 (20:18 -0800)]
When no candidates are present for an entity do not return EntityOwnershipState

Change-Id: I22c0100755a1fca50c638ff4b435e04bdd0f76ff
Signed-off-by: Moiz Raja <moraja@cisco.com>
6 years agoFix reading of EntityOwnerSelectionStrategy 92/33492/4
Moiz Raja [Thu, 7 Jan 2016 22:07:02 +0000 (14:07 -0800)]
Fix reading of EntityOwnerSelectionStrategy

1. The pid used for reading a config admin file should not have hyphens
   so replaced them with dots
2. The config admin returns properties that are not from the file
   so we need a way to ignore them. I specifically look for the
   a prefix of "entity.type." and ignore the other properties

Change-Id: I26a66176583ec39cbdb78fec749022429218e005
Signed-off-by: Moiz Raja <moraja@cisco.com>
6 years agoRemove Helium protobuff code from AppendEntries 09/33509/5
Tom Pantelis [Sun, 24 Jan 2016 04:58:46 +0000 (23:58 -0500)]
Remove Helium protobuff code from AppendEntries

We no longer need the pre-lithium/legacy protobuff serialization code in
AppendEntries so remove along with some legacy test code that was using it.

Change-Id: Ie68338e9ac96b3acc3b0aa208b393fe41ff6dfd6
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove unused protobuff messages 07/33507/5
Tom Pantelis [Sat, 23 Jan 2016 05:05:24 +0000 (00:05 -0500)]
Remove unused protobuff messages

Removed the following unused protobuff messages:

   ShardManager.proto
   MockPayload.proto
   KeyValueMessages.proto
   SimpleNormalizedNode.proto

Change-Id: I245068fe7c9ead9ea70d9983e73984067c7655da
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove ListenerRegistration protobuff messages 06/33506/3
Tom Pantelis [Sat, 23 Jan 2016 00:08:10 +0000 (19:08 -0500)]
Remove ListenerRegistration protobuff messages

The ListenerRegistration protobuff messages are used to serialize the
corresponding CDS messages but we don't actually send these messages
over the wire so they don't need serialization. So the protobuff
messages were removed. If we do need to serialize these messages in he
future we won't use protobuff.

Change-Id: I3818a965e0fd4e1876364022f2de09b1bac216d5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove DataChangeListener protobuff messages 05/33505/3
Tom Pantelis [Fri, 22 Jan 2016 23:36:56 +0000 (18:36 -0500)]
Remove DataChangeListener protobuff messages

The DataChangeListener protobuff messages are used to serialize the
corresponding CDS messages but we don't actually send these messages over
the wire so they don't need serialization. So the protobuff messages were
removed. If we do need to serialize these messages in the future we won't
use protobuff.

Change-Id: Ia72f3da2edbc6c1eeebfb022916894e2b1713840
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoHandle 3PC message backwards compatibility 86/33386/4
Tom Pantelis [Fri, 22 Jan 2016 19:03:04 +0000 (14:03 -0500)]
Handle 3PC message backwards compatibility

Modified the ThreePhaseCommitCohortProxy to send the appropriate 3PC
messages based on the backend cohort actor's version. The version is
supplied via a new CohortInfo class which also holds the existing cohort
ActorSelection Future. The caller actually specifies a Supplier to
obtain the version b/c the version may not be known until the
ActorSelection Future is known. The TransactionProxy passes a Supplier
which obtains the version from the TransactionContext. As a result, the
ThreePhaseCommitCohortProxy was refactored a bit to handle the CohortInfo
instances.

The ThreePhaseCommitCohortProxyTest was refactored to use real actors for
the cohorts instead of mocking messages via a mocked ActorContext.

Modified the ShardCommitCoordinator to return the appropriate versioned
replies.

Change-Id: I13e6acf81c1fe8abda43c30b1a73648e411ab500
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoDeprecate 3PC protobuff messages 85/33385/5
Tom Pantelis [Fri, 22 Jan 2016 11:34:19 +0000 (06:34 -0500)]
Deprecate 3PC protobuff messages

Deprecated the associated protobuff messages for

  CanCommitTransaction[Reply]
  CommitTransaction[Reply]
  AbortCommitTransaction[Reply]

The message classes now extend VersionedExternalizableMessage. Related
code was modified accordingly.

The PreCommitTransaction message is no longer used so it was removed.

Backwards compatibility with pre-boron will be implemented in the next
patch as ThreePhaseCommitCohortProxy needs some refactoring so the
appropriate cohort version can be used for the messages.

Change-Id: I8164ec82c7ef1623d38b1599af2f1c73fadb5300
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBUG-4869: use odl-lmax feature 22/33822/2
Robert Varga [Sun, 31 Jan 2016 00:43:58 +0000 (01:43 +0100)]
BUG-4869: use odl-lmax feature

Removes direct declaration of lmax version, pulling in odl-feature from
odlparent instead.

Change-Id: I52ca9433e25efc42159ee8929837f1b0d6f7292b
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoBUG 5115: Fix missing artifact exception in log 25/33625/4
oshvartz [Wed, 27 Jan 2016 10:53:00 +0000 (12:53 +0200)]
BUG 5115: Fix missing artifact exception in log

Add new dependency "org.apache.karaf.region.persist"
in karaf-parent pom to fix missing artifact exception
for region feature.

Change-Id: I1d08b69e4afee4e4911d9fc5be9cfd5250868b3f
Signed-off-by: oshvartz <oshvartz@redhat.com>
6 years agoBUG-2625: fix failures with Java 8-targetted artifacts 61/33661/2
Robert Varga [Wed, 27 Jan 2016 21:13:40 +0000 (22:13 +0100)]
BUG-2625: fix failures with Java 8-targetted artifacts

This patch bumps to use equinox 3.9.1 and removes the use of
mockito-all, fixing failures seen with source/target set to Java 8

Change-Id: I6964633e2c6b0de934045522c8f245fdb66901da
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoDeprecate ReadData/DataExists protobuff messages 78/33178/3
Tom Pantelis [Wed, 20 Jan 2016 12:57:38 +0000 (07:57 -0500)]
Deprecate ReadData/DataExists protobuff messages

Deprecated the associated ReadData, DataExists, and DataExistsReply protobuff
messages and changed the message classes to extend VersionedExternalizableMessage.
Backwards compatibility with pre-boron is maintained. Related code was modified
accordingly.

Change-Id: Ic9b1e79691ce77aecb36df38c1683deadac0c131
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoDeprecate CreateTransaction protobuff message 42/33142/5
Tom Pantelis [Wed, 20 Jan 2016 07:39:53 +0000 (02:39 -0500)]
Deprecate CreateTransaction protobuff message

Deprecated the associated CreateTransaction and CreateTransactionReply
protobuff messages and changed the message classes to extend
VersionedExternalizableMessage. Backwards compatibility with
pre-boron is maintained. Related code was modified accordingly.

One thing of note is wrt CreateTransactionReply. Previously it had a
version field that represented the leader shard's version. This is used
by the transaction front-end to send the appropriate version for
subsequent messages. However the front-end
RemoteTransactionContextSupport already knows the leader shard's version
from the PrimaryShardInfo which is used for write-only tx's and now the
CreateTransaction message so, to be consistent, it now always uses the
PrimaryShardInfo's version when creating the context instance.

Also I realized that the message versioning would correctly handle
backwards compatibility, ie a newer version sending to an older version,
but not the other way around. So for a newer version, 2, sending to an
older version, 1, the message version would be 1 and would be serialized
in the older format and would be correctly de-serialized on the other
end. However, for an older version, 1, sending to a newer version, 2,
the message version would be 2 but it would be serialized in the older
format and, on the other end, the recipient would see the version as 2
and think it's the newer/current version and it may not de-serialize
correctly. What we really want is to use the lower of the recipient's
version and the sender's version. So I modified the
VersionedExternalizableMessage ctor to do that.

I had to make a change to ShardTransactionChain but then realized it's
no longer used so I just removed it.

Change-Id: I18051c48ec4a8f4251e7acef1e1c24063e53ef24
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug 5109: Handle stand alone leaf nodes in CDS streaming 28/33228/2
Tom Pantelis [Thu, 21 Jan 2016 15:59:50 +0000 (10:59 -0500)]
Bug 5109: Handle stand alone leaf nodes in CDS streaming

Modified AbstractNormalizedNodeDataOutput to output the leaf set QName
that is now passed to leafSetEntryNode if no parent LeafSetNode QName is
present. Modified NormalizedNodeInputStreamReader accordingly.

I also found that OrderedLeafSetNode was not handled correctly.
AbstractNormalizedNodeDataOutput#startOrderedLeafSet needs to set
lastLeafSetQName.

The NormalizedNodePruner assumed a leaf set entry node must have a
parent and threw an exception if not, similarly with leaf node and anyXML
node. But all 3 can be standalone so I modified NormalizedNodePruner to
handle it.

Change-Id: I02a71d9280dac0eb466ff401699a40d3d8826220
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug 4992: Removed old leader's candidates on leader change 01/33601/2
Tom Pantelis [Wed, 27 Jan 2016 00:33:04 +0000 (19:33 -0500)]
Bug 4992: Removed old leader's candidates on leader change

Modified onLeaderChanged to call removeCandidateFromEntities same as
onPeerDown.

Change-Id: I9b56e64254485fa0de4fdc1b7f4f6ddf100338af
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove Helium ReadDataReply protobuff message 98/33098/3
Tom Pantelis [Wed, 20 Jan 2016 04:02:55 +0000 (23:02 -0500)]
Remove Helium ReadDataReply protobuff message

The ReadDataReply protobuff message was kept for backwards compatibility
with Helium so remove it.

Change-Id: I3a30f113903f6d908bea698c0bb9bc773046237e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove deprecated ShardDataTree constructor 99/33499/1
Robert Varga [Mon, 25 Jan 2016 18:45:54 +0000 (19:45 +0100)]
Remove deprecated ShardDataTree constructor

The constructor without a TreeType has been deprecated in Beryllium,
remove it now.

Change-Id: I3248926594b892edaa931db2f1b77a0ef1dec145
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoDeprecate CloseTransaction protobuff message 41/33141/3
Tom Pantelis [Wed, 20 Jan 2016 06:19:18 +0000 (01:19 -0500)]
Deprecate CloseTransaction protobuff message

Deprecated the associated CloseTransaction and CloseTransactionReply
protobuff messages and changed the message classes to extend
VersionedExternalizableMessage. Backwards compatibility with pre-boron
is maintained. Related code was modified accordingly.

While the backend sends back the CloseTransactionReply, the transaction
front-end doesn't actually use it so I removed the protobuff-related
code in CloseTransactionReply as it doesn't matter which serialized
version is returned.

Change-Id: I42946bbb38c5ff84d05ee0578d8ca9c8f124d5ed
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove Helium Tx modify operation messages 55/33055/3
Tom Pantelis [Tue, 19 Jan 2016 23:18:19 +0000 (18:18 -0500)]
Remove Helium Tx modify operation messages

Removed the following deprecated Helium Tx messages and related code:

  DeleteData[Reply]
  MergeData[Reply]
  WriteData[Reply]
  ReadyTransaction

Also removed the associated protobuf message classes.

Change-Id: I6f5db0096a60b50e51bf94b12f38941a4be9ca20
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove deprecated PreLithium Tx context classes and related code 39/33039/2
Tom Pantelis [Tue, 19 Jan 2016 21:50:51 +0000 (16:50 -0500)]
Remove deprecated PreLithium Tx context classes and related code

Change-Id: I023f488f58096eef9173213d75befbe3cfc78da9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBump yangtools to 1.0.0-SNAPSHOT 90/33290/4
Thanh Ha [Thu, 21 Jan 2016 21:13:20 +0000 (16:13 -0500)]
Bump yangtools to 1.0.0-SNAPSHOT

Change-Id: Ic55c573d6d57b27cb8f2640c938e6b7eeb08a42f
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoReduce logging in QuarantinedMonitorActor 85/33185/2
Tom Pantelis [Wed, 20 Jan 2016 19:01:41 +0000 (14:01 -0500)]
Reduce logging in QuarantinedMonitorActor

The QuarantinedMonitorActor logs every AssociationErrorEvent as warn
which causes a lot of output when a peer node is down as akka raises a
conneciton-refused event every 5 sec until it re-connects. Since we're
only interested in the specific quarantined event, which is logged at
warn, other events should log to debug to avoid the noise.

Change-Id: I26ab7db9a71d137ae3227409d6dcbf39675c6ec9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoClear out router event on completion 74/32874/2
Robert Varga [Sat, 16 Jan 2016 14:59:41 +0000 (15:59 +0100)]
Clear out router event on completion

Rather than keeping references on heap, clear references once the future
has been notified. Also some logging to enable debugging.

Change-Id: I2ab352db51134b30fb352a4adabc07eda0945841
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
6 years agoMake RequestVote immutable and change AbstractRPC#term to private 08/33008/3
Tom Pantelis [Mon, 18 Jan 2016 10:16:40 +0000 (05:16 -0500)]
Make RequestVote immutable and change AbstractRPC#term to private

RequestVote has setters which aren't used. This class should be
immutable with final fields.

RequestVote also overrides getTerm from AbstractRPC as do a couple other
classes. This is unnecessary. Also AbstractRPC#term was changed from
protected to private.

Change-Id: Ie8891b49a37c9580abe7e52e288861c37de26fcd
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemove the leader's FollowerLogInformation on RemoveServer 02/33002/2
Tom Pantelis [Mon, 18 Jan 2016 09:03:58 +0000 (04:03 -0500)]
Remove the leader's FollowerLogInformation on RemoveServer

On RemoveServer, if removing follower, we need to also remove the
FollowerLogInformation entry from the followerToLog map in
AbstractLeader. Also, if a snapshot was being installed, we should
cleanup the mapFollowerToSnapshot.

Change-Id: I37df57a82a1c79ce375e48127bafd661a2dfe2c6
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug in AbstractLeader replication consensus 48/32848/5
Gary Wu [Fri, 15 Jan 2016 19:31:48 +0000 (11:31 -0800)]
Bug in AbstractLeader replication consensus

In determining whether to advance the commit index, only the voting
members should be counted in the replicatedCount.  There was a logic
error that instead caused it to be incorrectly based on whether the
AppendEntriesReply message as sent by a voting member.

This patch fixes the issue.

Change-Id: I6efb9574c39db608351297fc2552689d1ff77979
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
6 years agoUse ActorFactory in ShardTest 73/32473/5
Tom Pantelis [Tue, 12 Jan 2016 20:43:09 +0000 (15:43 -0500)]
Use ActorFactory in ShardTest

And other minor refactoring.

Change-Id: Ic8c23aff6f0109e16f9175577efa1219bd6a07a5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBUG-4963: Bump scala to 2.11.7 52/30252/7
Tomas Cere [Tue, 24 Nov 2015 08:25:25 +0000 (09:25 +0100)]
BUG-4963: Bump scala to 2.11.7

With 2.10 i was experiencing random freezes
when installing features that used it in karaf.
Bumping to 2.11 doesn't seem to break anything
nor has any downsides.

We have scala.micro.version defined so use it instead of the
hardcoded micro version

Change-Id: I2a445790980d0da3152db3664294fd789f8272c7
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoAdded the option for user-confugrable number of data tree change listeners that liste... 78/32378/2
Jan Medved [Tue, 12 Jan 2016 02:01:39 +0000 (18:01 -0800)]
Added the option for user-confugrable number of data tree change listeners that listen on the text-exec data tree.

Change-Id: I485b416e262e948545357f5f84da5474c5e14490
Signed-off-by: Jan Medved <jmedved@cisco.com>
6 years agoBug in AbstractLeader replication consensus 22/32722/4
Tom Pantelis [Wed, 13 Jan 2016 21:14:27 +0000 (16:14 -0500)]
Bug in AbstractLeader replication consensus

I ran into an issue where the leader's commit index wasn't advancing
for new log entries even though consensus was reached. This scenario can
occur if the leader previously didn't get consensus and thus didn't commit
and apply a log entry and later regains leadership with a higher term.

The code in handleAppendEntriesReply doesn't update the commit index
if an entry's term doesn't match the current term. This behavior is correct
as per the raft paper - ยง5.4.1: "Raft never commits log entries from
previous terms by counting replicas". However the code also breaks out
of the loop and thus can never make progress on new entries in the current
term that reach consensus. This part is incorrect - as per raft "once an
entry from the current term is committed by counting replicas, then all
prior entries are committed indirectly". Therefore we need to continue
processing subsequent log entries in order to eventually make progress.

Change-Id: I2d093848c3a846e1f6420ac695b4ff652a65bf6b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug 4455 - Inconsistent COMMIT operation handling when no transactions are present 95/32595/5
Jakub Morvay [Thu, 14 Jan 2016 16:02:42 +0000 (17:02 +0100)]
Bug 4455 - Inconsistent COMMIT operation handling when no transactions are present

Return positive response for commit operation in config subsystem
netconf northbound even if no candidate transaction is open for session.

Need to be merged after https://git.opendaylight.org/gerrit/#/c/32598/

Change-Id: Ia6ce2aa6ffdfafc47f69ae7315669f64b653c514
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoRevert "Add mockito-configuration to tests" 18/32818/2
Robert Varga [Fri, 15 Jan 2016 12:20:32 +0000 (12:20 +0000)]
Revert "Add mockito-configuration to tests"

This reverts commit dcc92fc8fdf056d5ada94931f2d24523070fd9a7.

Change-Id: Ia89b88f9b933d31d369e5ad75ebf8c762c9dfde0
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
6 years agoBUG 4017: Notification publish service is not available from provider context 46/32346/5
Tomas Cere [Mon, 11 Jan 2016 16:08:11 +0000 (17:08 +0100)]
BUG 4017: Notification publish service is not available from provider context

Change-Id: I2cb2dd4e6e3c22b8db1d368bde2c914d53100661
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoDisallow remove leader in single node 91/32391/3
Tom Pantelis [Tue, 12 Jan 2016 06:30:29 +0000 (01:30 -0500)]
Disallow remove leader in single node

We don't want to allow removal of the leader in a single node cluster,
ie when there's no followers.

Change-Id: I3bedd1727736c7dfec55ba696f5ef1197a68c89d
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoSet to non-voting if not in server confguration 90/32390/2
Tom Pantelis [Tue, 12 Jan 2016 06:07:35 +0000 (01:07 -0500)]
Set to non-voting if not in server confguration

On recovery, if a RaftActor is not in its own recovered
ServerConfigurationPayload list, then set itself to a non-voting member
so it stays at Follower and doesn't try to start an election.

This scenario is an edge case for Shards as, normally, when a server is
removed, it self-destructs and is removed from the ShardManager. However
there is a small window where disconnect or shutdown could prevent
ShardManager removal from occurring. This patch protects against a server
restart causing disruption after removal.

Change-Id: I64ecd89cddec7a4e1711e0d8d17c7ea6b36e29a0
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBumping versions by 0.1.0 for next dev cycle 90/32690/1
Thanh Ha [Fri, 15 Jan 2016 01:14:41 +0000 (20:14 -0500)]
Bumping versions by 0.1.0 for next dev cycle

Change-Id: I2155a23eb208cc34d29b3e5ee0c8f6a3f551cacf
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
6 years agoRemove ModificationPayload class 01/32401/5
Tom Pantelis [Tue, 12 Jan 2016 08:31:03 +0000 (03:31 -0500)]
Remove ModificationPayload class

The ModificationPayload class was introduced early in Lithium but was
replaced later in Lithium by DataTreeCandidatePayload. Since ModificationPayload
was never contained in a release it can be removed.

Change-Id: Ia4da96695fb9c0356d16f048451b4dab7e0bcf70
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoRemoved unused actorPath from ShardManager. 08/31408/5
Tony Tkacik [Wed, 16 Dec 2015 09:25:40 +0000 (10:25 +0100)]
Removed unused actorPath from ShardManager.

Change-Id: I31f52e59ff59d5acc86feed32118a392cf1132bc
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
6 years agoBUG 4930 & BUG 4017: Allow multiple refine statements in MXBean generation 30/32430/3
Tomas Cere [Tue, 12 Jan 2016 14:30:46 +0000 (15:30 +0100)]
BUG 4930 & BUG 4017: Allow multiple refine statements in MXBean generation

Stops enforcing a single refine statement when generating MXBean's.

Change-Id: I2f07fc23b355b1871170a00baf52db34f5e6eb66
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoRemove deprecated getDataStoreType methods 96/32396/3
Tom Pantelis [Tue, 12 Jan 2016 07:27:11 +0000 (02:27 -0500)]
Remove deprecated getDataStoreType methods

getDataStoreName methods were recently added to DatastoreContext and ActorContext
to replace the getDataStoreType methods. The latter were marked as
deprecated but we can remove them since they aren't public APIs outside
of the context of sal-distributed-datastore. The remaining callers were
migrated to the getDataStoreName methods.

Change-Id: I7dab731d96b3b8c249a59824de4d78ea72500e05
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug 3871: Deprecate opendaylight-inventory model. 77/25477/9
Tony Tkacik [Wed, 19 Aug 2015 12:53:16 +0000 (14:53 +0200)]
Bug 3871: Deprecate opendaylight-inventory model.

Change-Id: I526496120b79158df41aec315d67303e4604074b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoUpdate features archetypes 14/31814/3
Stephen Kitt [Wed, 23 Dec 2015 11:01:00 +0000 (12:01 +0100)]
Update features archetypes

* Use {{VERSION}} in the documentation comments.
* Use {{VERSION}} in the generated features.xml.
* Remove an invalid space in the schema locations.
* Hook up opendaylight-karaf-features to features-parent.
* Import yangtools-artifacts in the generated features pom.xml.
* Remove redundant versions in the generated features pom.xml.

Change-Id: I60e7d49d0d29a1d9040501e7a8fa0a61ef6fc1bc
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoAdd mockito-configuration to tests 45/32045/11
Robert Varga [Sat, 2 Jan 2016 23:38:29 +0000 (00:38 +0100)]
Add mockito-configuration to tests

Ynagtools' mockito-configuration ensures that all methods touched in
mocked objects have to be mocked, preventing failures which are hard to
track down.

The reason for this is that by default unmocked methods do nothong and
return null -- injecting nulls into context which do not expect them.

Change-Id: If7b9afac01128be6f1b2a90b1e8c068cb4a39b65
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
6 years agoInternalJMXRegistration should be an ObjectRegistration 58/31858/9
Robert Varga [Wed, 23 Dec 2015 23:55:54 +0000 (00:55 +0100)]
InternalJMXRegistration should be an ObjectRegistration

This way it follows AutoCloseable#close() contract, e.g. allows multiple
invocations.

Change-Id: Ied93bbdd388189a928cf06cbbc913fe124a284dd
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoIntroduce lifecycle to runtime beans registrator in config-manager 14/32314/3
Maros Marsalek [Sat, 9 Jan 2016 13:44:59 +0000 (14:44 +0100)]
Introduce lifecycle to runtime beans registrator in config-manager

Root runtime bean registrator was not properly closed or reused
during reconfiguration.

Change-Id: I537f7af5957496001f51663ded206a4ab04e5401
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
6 years agoUse local param in persist callback 25/32025/6
Robert Varga [Sat, 2 Jan 2016 17:59:33 +0000 (18:59 +0100)]
Use local param in persist callback

The message being persisted is echoed as the parameter, no need to
reference it via a global argument. Also add preconditions to guard
against null context/behavior.

Change-Id: Ia93fcf6d331492081a1a3c69899c86e1b55d1e71
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
6 years agoRemove deprecated DataExistsReply constructor 95/32395/2
Tom Pantelis [Tue, 12 Jan 2016 06:57:07 +0000 (01:57 -0500)]
Remove deprecated DataExistsReply constructor

The DataExistsReply was previously deprecated and is not in use so
remove it.

Change-Id: Ib1c184901be8070f70c14f4125fdfbefc59b541d
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoBug 2062 - StreamWriter APIs loses information about leaf-set ordering 76/12676/12
Robert Varga [Mon, 10 Nov 2014 15:16:57 +0000 (16:16 +0100)]
Bug 2062 - StreamWriter APIs loses information about leaf-set ordering

* modified clustering NormalizedNodeStreamWriter implementation to use
OrderedLeafSet

Change-Id: I663f6b6d894b8366b7a54a3c56be05f20fef43c2
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
6 years agoImplement remove-all-shard-replicas RPC 60/32360/1
Tom Pantelis [Mon, 11 Jan 2016 16:45:01 +0000 (11:45 -0500)]
Implement remove-all-shard-replicas RPC

Change-Id: Idc1481c0f6903554fd6659c32c9639af5aa47e92
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoSend Shutdown message to Shard on ServerRemoved 38/32238/4
Tom Pantelis [Wed, 6 Jan 2016 13:24:33 +0000 (08:24 -0500)]
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>
6 years agoProvide new runtime bean registrator for recreated module 91/32291/2
Maros Marsalek [Fri, 8 Jan 2016 16:32:06 +0000 (17:32 +0100)]
Provide new runtime bean registrator for recreated module

After recent changes in config-manager, runtime bean registrations are not
preserved after reconfiguration of a module. This is caused because internal
jmx registrators are now properly closed. Runtime bean registrations relied
on previous, incorrect behavior.

This commit fixes the issue by recreating runtime bean registrator for each module.
However there's a possible leak if clients do not close runtime bean registrations
in their createInstance methods.

Change-Id: I37f0956effdd2a183390252615c23a90e23ebe8e
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
6 years agoImplement RemoveServer for leader 37/32237/2
Tom Pantelis [Wed, 6 Jan 2016 13:15:26 +0000 (08:15 -0500)]
Implement RemoveServer for leader

Implemented RemoveServer for leader which previously was coded to fail
with the NOT_SUPPORTED error until leadership transfer was implemented.
Leadership transfer will be triggered via the Shutdown message in the
ShardManager via ServerRemoved message. This wil be done in a subsequent
patch.

Change-Id: Iae7895a3801986e482073ccf8ea24e5b720b7618
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
6 years agoDrop karaf-maven-plugin from it-base/parent 97/32197/2
Stephen Kitt [Wed, 6 Jan 2016 19:20:23 +0000 (20:20 +0100)]
Drop karaf-maven-plugin from it-base/parent

This is no longer used for building; removing it greatly simplifies
the dependency tree of projects using the it-base stuff. In
particular, it drops commons-collections 3.2.1 which otherwise gets
flagged by various security tools (because of CVE-2015-7501).

Change-Id: I5960e6436833ecf623228685f254a0a55ebf292c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoExpose yang source provider into config subsystem 24/32224/5
Maros Marsalek [Thu, 7 Jan 2016 12:25:18 +0000 (13:25 +0100)]
Expose yang source provider into config subsystem

Change-Id: Ie5ae543e2be0f1ef129c97cd3e5e945ba6467d89
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>