controller.git
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 years agoBUG-4514: use SimpleImmutableEntry 47/32147/5
Robert Varga [Tue, 5 Jan 2016 15:05:44 +0000 (16:05 +0100)]
BUG-4514: use SimpleImmutableEntry

Instead of brewing our own class, reuse an Entry implementation from
JRE.

Change-Id: I94972985050921838f0b217a0957a413d7971427
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4514: clean children in InternalJMXRegistrator 08/31808/11
Robert Varga [Tue, 22 Dec 2015 18:44:27 +0000 (19:44 +0100)]
BUG-4514: clean children in InternalJMXRegistrator

Retaining children once they have been closed can lead to a leak, make
sure we call back to parent to remove ourselves from its list.

This includes a refactor to hide InternalJMXRegistrator, which becomes
abstract and has two subclasses: Root and Nested. This allows us to use
proper synchronization between closing of the child and parent
registrators. Also saves a bit of memory.

Also clean up {Module,Transaction}JMXRegistrator constructors to not do
a createChild(), as that fails to cleanup immediate children of the
Root, leading to empty InternalJMXRegistrators being collected in Root's
child list.

Change-Id: I9a4708b67777ca6033e5a83c586b3f78692dff2a
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoDon't transfer leadership to a non-voting follower 91/32191/3
Tom Pantelis [Wed, 6 Jan 2016 06:19:14 +0000 (01:19 -0500)]
Don't transfer leadership to a non-voting follower

Change-Id: I5ee97f2cef50b100f21627f26ba6c339972cd677
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAbort pending txn's in Shard on leader transition and shutdown 79/31979/5
Tom Pantelis [Wed, 30 Dec 2015 11:07:31 +0000 (06:07 -0500)]
Abort pending txn's in Shard on leader transition and shutdown

Added code in the ShardCommitCoordinator to abort pending txn's with an
appropriate failure message when leadership is lost and on shutdown.

Also moved the handleTransactionCommitTimeoutCheck logic from the Shard
to the ShardCommitCoordinator for consistency.

Change-Id: I4af1262aba76909536348a07a368f1559714f90d
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBug 4823: Add ReachableMember event to Cluster subscription 19/32219/3
Tom Pantelis [Wed, 6 Jan 2016 14:30:06 +0000 (09:30 -0500)]
Bug 4823: Add ReachableMember event to Cluster subscription

The ShardManager wasn't receiving ReachableMember events from the akka
cluster because ClusterWrapperImpl wasn't subscribing for it.

Change-Id: I61f1be23bdffb1d9384fea6610c72d39d5a865aa
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoImplement graceful ShardManager shutdown 52/31952/8
Tom Pantelis [Tue, 29 Dec 2015 15:11:19 +0000 (10:11 -0500)]
Implement graceful ShardManager shutdown

Implemented the ShutDown message in ShardManager to issue a graceful stop
with a Shutdown message to each shard. When the stop futures complete,
the ShardManager sends a PoisionPill to itself.

The ActorContext now issues a graceful stop to the ShardManager with a
Shutdown message.

Change-Id: I13e17cc06d44f524a469cea7acfa45c3ba5e52bd
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoFix intermittent failure in DistributedEntityOwnershipIntegrationTest 18/32218/3
Tom Pantelis [Wed, 6 Jan 2016 14:21:23 +0000 (09:21 -0500)]
Fix intermittent failure in DistributedEntityOwnershipIntegrationTest

testCloseCandidateRegistrationInQuickSuccession fails sometimes with an
"Unfinished stubbing" error from Mockito. Moved the stubbing calls above
the close calls to fix it.

Change-Id: I1a6bd789c7745d3a7b80cf166eda51f819ce2df1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoImplement pauseLeader timeout for leadership transfer 42/31942/6
Tom Pantelis [Tue, 29 Dec 2015 11:52:45 +0000 (06:52 -0500)]
Implement pauseLeader timeout for leadership transfer

Added an abstract TimedRunnable class that implements a Runnable operation
with a timer such that if the run method isn't invoked within a timeout
period, the operation is cancelled. The
RaftActorLeadershipTransferCohort passes a TimedRunnable instance to
pauseLeader to abort the transfer if pauseLeader doesn't complete within
an election timeout period.

Change-Id: I773605117dc4e310f3ee5025c0131b9f1447c746
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoImplement suspend leader in Shard 36/31936/6
Tom Pantelis [Mon, 21 Dec 2015 20:42:35 +0000 (15:42 -0500)]
Implement suspend leader in Shard

Added code in the ShardCommitCoordinator to invoke the Runnable
operation that is passed via pauseLeader when pending transactions are
complete. A subsequent patch will add a timer to cap the amount of time
to wait for pauseLeader to complete.

Change-Id: I3fe0b0ce4e025b2f68ce9c0150732bc4eabf5e0a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBump akka-bundled netty to 3.9.9 03/31503/6
Robert Varga [Thu, 17 Dec 2015 12:39:16 +0000 (13:39 +0100)]
Bump akka-bundled netty to 3.9.9

Version 3.8.0 is rather ancient, 3.9.9 is the latest binary-compatbile
revision the 3.x release train, offering performance and correctness
fixes.

Change-Id: Ia3a2a7cf17d92a30e194377c1592d6e7ff50c41e
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoRefactor TransactonContext 85/31485/6
Gary Wu [Wed, 16 Dec 2015 22:29:02 +0000 (14:29 -0800)]
Refactor TransactonContext

Rafactor TransactionContext to:

Consolidate write(), merge(), and delete() into a
single executeModification() method.

Consolidate read() and dataExists() into a
single executeRead() method.

Change-Id: I559c974295e097ab53f08037329aa3252647331c
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
8 years agoUse ArrayDeque instead of LinkedList 23/32023/2
Robert Varga [Sat, 2 Jan 2016 17:05:02 +0000 (18:05 +0100)]
Use ArrayDeque instead of LinkedList

We are using the list as a Queue, ArrayDeque has less memory overhead
and linear element packing. It is also documented as to be likely faster
than LinkedList.

Change-Id: I270e307360402350e3aab01ee3a8177283a85118
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBug 4823: Notify findPrimary callbacks on ReachableMember event 66/31866/3
Tom Pantelis [Thu, 24 Dec 2015 11:01:43 +0000 (06:01 -0500)]
Bug 4823: Notify findPrimary callbacks on ReachableMember event

Modified the ShardManager to notify waiting findPrimary callbacks when a
ReachableMember event is received and leaderAvailable is set to true.
This prevents waiting findPrimary queries from timng out with
NoShardLeaderException.

Change-Id: Iabcc6f2a66e5271342914ebfcaad23dd1e122787
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoRemove unnecessary casts 01/32101/2
Gary Wu [Mon, 4 Jan 2016 19:46:23 +0000 (11:46 -0800)]
Remove unnecessary casts

Change-Id: I6a1e8e04a010585d5530d286851108d0dc3642ca
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
8 years agoRemove unnecessary casts 02/32102/2
Gary Wu [Mon, 4 Jan 2016 19:48:18 +0000 (11:48 -0800)]
Remove unnecessary casts

Change-Id: Ib20f8d15529293ee9037c7213ed5eb388ba532ac
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
8 years agoAdded support for multiple data store types to DOM transaction chains and to simple... 99/31399/5
Jan Medved [Wed, 16 Dec 2015 05:34:58 +0000 (21:34 -0800)]
Added support for multiple data store types to DOM transaction chains and to simple transactions
Fixed a build break introduced by rebase

Change-Id: Id8cbaeed5e54d0e275adadaa79d4eddb8fcc58eb
Signed-off-by: Jan Medved <jmedved@cisco.com>
8 years agoAdd missing license headers 79/31379/3
Thanh Ha [Tue, 15 Dec 2015 23:11:34 +0000 (18:11 -0500)]
Add missing license headers

Change-Id: I8c49e33e015df601b4825c861a54c9719b42bc93
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoBug 4850: Fix follower out-of-sync logic wrt replicatedToAllIndex 68/31968/2
Tom Pantelis [Wed, 30 Dec 2015 02:39:55 +0000 (21:39 -0500)]
Bug 4850: Fix follower out-of-sync logic wrt replicatedToAllIndex

If the AppendEntries prevLogIndex is -1 and replicatedToAllIndex != -1,
it flags the follower as out-of-sync if there's no log entry for
replicatedToAllIndex. However replicatedToAllIndex may be in the
snapshot so I added a check for that as well. This fixes the issue
described in bug 4850.

Change-Id: If499dadc5f2a3c3823d617e60410b0f63df389d7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoRemove unnecessary casts 03/32103/2
Gary Wu [Mon, 4 Jan 2016 19:52:54 +0000 (11:52 -0800)]
Remove unnecessary casts

Change-Id: I427e1ea726991d32810dc191e276114c556eff29
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
8 years agoRemove unnecessary code 04/32104/2
Gary Wu [Mon, 4 Jan 2016 19:55:53 +0000 (11:55 -0800)]
Remove unnecessary code

Remove unnecessary casts and @SuppressWarnings

Change-Id: I817cdf97e708e4f9c4c343c44f54de60cbcb6eff
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
8 years agoMake LocalThreePhaseCommitCohort::operationError final 64/31464/2
Tom Pantelis [Tue, 15 Dec 2015 18:45:27 +0000 (13:45 -0500)]
Make LocalThreePhaseCommitCohort::operationError final

This is a follow-up to https://git.opendaylight.org/gerrit/#/c/31448/ to
make LocalThreePhaseCommitCohort::operationError final and remove the
setter. The callers were refactored to use the
LocalThreePhaseCommitCohort ctor that passes the operationError.

Change-Id: I68f69be08e7f74524e92f224172ebf1ca9469017
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoOverride license checker for yang-test 78/31378/2
Thanh Ha [Tue, 15 Dec 2015 23:16:54 +0000 (18:16 -0500)]
Override license checker for yang-test

yang-test generates files which prevents us from validating license
headers correctly.

Change-Id: I4755f702a87fc428162b75e8359ca5132264a60a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
8 years agoFix generator path inconsistent cause Eclipse build path missing problems 25/30425/2
xsir [Tue, 1 Dec 2015 09:24:10 +0000 (17:24 +0800)]
Fix generator path inconsistent cause Eclipse build path missing problems

Change-Id: I8aed23fd22355f006d571d60081cf42108dc68d1
Signed-off-by: xsir <xujinchuan@huawei.com>
8 years agoAdding multiple data store capabilities to the Tx-Chain DOM writer 46/31246/3
Jan Medved [Mon, 14 Dec 2015 05:49:52 +0000 (21:49 -0800)]
Adding multiple data store capabilities to the Tx-Chain DOM writer

Change-Id: I113ef591c9e2813f4cb32e793e85ff63f585c148
Signed-off-by: Jan Medved <jmedved@cisco.com>
8 years agoPull in com.typesafe:config from odlparent 52/31352/5
Stephen Kitt [Tue, 15 Dec 2015 14:43:27 +0000 (15:43 +0100)]
Pull in com.typesafe:config from odlparent

Along with an equivalent patch to netconf (forthcoming), this will
ensure the versions of com.typesafe:config are the same in both
projects, avoiding issues loading Karaf features in some cases
(e.g. odl-restconf-all from the netconf distribution).

This involves migrating features-akka to features-parent, which
requires support for extended version specifiers in odlparent
(I5033fae1ea13a31b1f2e3b97806829fe086e5f92). commons.odlparent is used
as an artifact POM to avoid having to duplicate properties, without
embarking on a whole-sale property clean-up (yet).

Change-Id: Ie557c8cb1634552acdf4762a5fe13a902a0ce8c2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoAdd ShutDown message to RaftActor to transfer leader 65/31565/8
Tom Pantelis [Wed, 16 Dec 2015 17:37:42 +0000 (12:37 -0500)]
Add ShutDown message to RaftActor to transfer leader

Added a ShutDown message to gracefully stop a RaftActor. If the leader,
it attempts leadership transfer as follows:

1) Send a LeaderStateChanged message with a null leader Id to the local
RoleChangeNotifier. This will cause the ShardManager to clear it's
cached leader state and primaryInfoCache.

2) Send a LeaderTransitioning message to each follower so each can send
LeaderStateChanged messages to their local RoleChangeNotifiers.

3) Call a protected method, pauseLeader, passing the
RaftActorLeadershipTransferCohort. This allows derived classes to
perform work prior to transferring leadership. The Shard will wait for
current transactions to complete.

4) After pause is complete, the run method on the
RaftActorLeadershipTransferCohort is called which in turn calls
transferLeadership on the Leader.

5) When transfer is complete, send a PoisonPill to self.

If not the leader or has no followers, it just calls pauseLeader an
sends a PoisonPill on completion.

Change-Id: I27fa8a95f260b75516b7e558caea4a1a3255dda3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAdd RaftActorLeadershipTransferCohort and implement transfer in Leader 08/31508/5
Tom Pantelis [Wed, 16 Dec 2015 08:57:15 +0000 (03:57 -0500)]
Add RaftActorLeadershipTransferCohort and implement transfer in Leader

Added a transferLeadership method to Leader that takes a
RaftActorLeadershipTransferCohort to be notified when transfer is
complete.

The leader looks for a follower via AppendEntriesReply whose cached
matchIndex matches the leader's last index. If one is found, it sends
an additional AppendEntries to ensure the follower has applied all its
log entries to its state. It then sends an ElectionTimeout to immediately
start an electioni and notifies the RaftActorLeadershipTransferCohort
via transferComplete.

If no matching follower is found initially, the leader tries again at
the next heartbeat interval via AppendEntriesReply. This continues until
either a matching follower is found or the election timeout period
elapses. The latter is checked at each heartbeat interval via
beforeSendHeartbeat. On time out, it notifies the
RaftActorLeadershipTransferCohort via abortTransfer.

Change-Id: I841e13fdde27ee57b9789a4df6f69bf9901c1e79
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAdd LeaderTransitioning message to RaftActor 07/31507/3
Tom Pantelis [Tue, 15 Dec 2015 22:23:01 +0000 (17:23 -0500)]
Add LeaderTransitioning message to RaftActor

Adds a LeaderTransitioning message that sends a LeaderStateChanged
message to the RoleChangeNotifier actor with a null leaderId. This will
be used in subsequent patches for leadership transfer. This message will
be sent from the leader to its followers. The resulting
LeaderStateChanged message causes the ShardManager to clear its cached
leader info for the shard so subsequent transactions will wait for the new
leader to come on line.

Change-Id: I2a91374992687a478af1c76b74128e7b0f813c45
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoTransaction retry when leader is isolated 30/31230/4
Tom Pantelis [Fri, 11 Dec 2015 23:02:07 +0000 (18:02 -0500)]
Transaction retry when leader is isolated

Implemented retry of transaction ready messages,
ForwardedReadyTransaction, ReadyLocalTransaction, and
BatchedModifications, when the leader is isolated.

Change-Id: I4524dd99f867173f8666de4aed637124ff1efa50
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoTransaction message retry when no shard leader present 83/31183/8
Tom Pantelis [Fri, 11 Dec 2015 08:27:28 +0000 (03:27 -0500)]
Transaction message retry when no shard leader present

Implemented retry of transaction ready messages,
ForwardedReadyTransaction, ReadyLocalTransaction, and
BatchedModifications, when there's no current shard leader.

A new class, ShardTransactionMessageRetrySupport, maintains a
list of messages to retry and handles the retry logic. If there
is no leader, the message is added to the list and a timer
(2 * election time out) is started. If a leader is elected, on leader
changed, the messages are retried. If no leader is elected in time,
the messages are removed and NoShardLeaderException is returned.

Change-Id: Iade3fd245982d75ee97acf0534e9224551d9e45d
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoFixed incorrect model. 38/31638/1
Tony Tkacik [Sat, 19 Dec 2015 17:55:17 +0000 (18:55 +0100)]
Fixed incorrect model.

Change-Id: I6a3e533e04c76a9d9f69815fcf1cbc91b52834c8
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoAdd unit test for ReadyLocalTransaction NPE 63/31463/2
Tom Pantelis [Tue, 15 Dec 2015 17:46:48 +0000 (12:46 -0500)]
Add unit test for ReadyLocalTransaction NPE

This is a follow-up to https://git.opendaylight.org/gerrit/#/c/31448/
to add a unit test for the scenario that caused a null modification
instance passed to ReadyLocalTransaction from
LocalThreePhaseCommitCohort. Basically the LocalThreePhaseCommitCohort
was created with a non-null operationError which was later erroneously
set to null.

Change-Id: I2891b5653b5d425079dbb99ce65e52d3ebbc6a27
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBug 4774: Wait for prior RO tx creates on tx chain 18/31318/5
Tom Pantelis [Mon, 14 Dec 2015 23:27:10 +0000 (18:27 -0500)]
Bug 4774: Wait for prior RO tx creates on tx chain

Added a priorReadOnlyTxPromises map to TransactionChainProxy that holds
Promise instances for each read-only tx. When the parent class completes
the primary shard lookup and creates the TransactionContext (either success or
failure), onTransactionContextCreated is called which completes the Promise. A
write tx that is created prior to completion will wait on the Promise's Future via
findPrimaryShard.

Change-Id: Ib1a620cfd5be3e38f633b3faf9ef7a31abaaf345
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoAdd missing relatedPath for aggregator's parent 94/31194/2
adetalhouet [Fri, 11 Dec 2015 13:15:32 +0000 (08:15 -0500)]
Add missing relatedPath for aggregator's parent

Change-Id: I93d6f9f47d4da3ae7f113651b4903bc6d9de7f86
Signed-off-by: adetalhouet <adetalhouet@inocybe.com>
8 years agoBUG-1014: adjust compatibility tests 79/31479/2
Robert Varga [Wed, 16 Dec 2015 21:28:13 +0000 (22:28 +0100)]
BUG-1014: adjust compatibility tests

Hydrogen compatibility tests used operational data with configuration
datastore, preventing merge job from completing. Switch to using
operational datastore.

Change-Id: Ifb0dac52523f87d0b6482e4741036ef8395ff3a8
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMake a method static 27/31427/2
Robert Varga [Wed, 16 Dec 2015 14:28:32 +0000 (15:28 +0100)]
Make a method static

This test method can be made static, make it so to fix an eclipse
warning (with strict warnings).

Change-Id: I492f31782ff2be712d66ce9823bf32db2bc394e1
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoDo not overwrite operation failure 48/31448/2
Robert Varga [Wed, 16 Dec 2015 15:44:40 +0000 (16:44 +0100)]
Do not overwrite operation failure

When a ready-time failure occurs, do not overwrite it with a null
operation error (if no operations failed).

Change-Id: If2ac379e25af7bc93602b91ea5b068974a196771
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoGuard against null transaction IDs 25/31425/1
Robert Varga [Wed, 16 Dec 2015 13:55:09 +0000 (14:55 +0100)]
Guard against null transaction IDs

This pushes down the null guards so that we can track down the source of
nulls.

Change-Id: Id94db7ba1810b2331f625f335ee610b3a22b3c44
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG 2187 Implement Remove Shard Replica RPC 99/30999/3
Moiz Raja [Tue, 8 Dec 2015 17:23:24 +0000 (09:23 -0800)]
BUG 2187 Implement Remove Shard Replica RPC

Change-Id: I8ccdf81903c505ecf77ed9f91b6021aae9fe8d0d
Signed-off-by: Moiz Raja <moraja@cisco.com>
8 years agoBUG 2187 Handle RemoveShardReplica in ShardManager 30/30330/6
Moiz Raja [Fri, 20 Nov 2015 01:35:42 +0000 (17:35 -0800)]
BUG 2187 Handle RemoveShardReplica in ShardManager

Change-Id: Iaaabe6ab351d8f0964d32fa9e7e71416a2a10209
Signed-off-by: Moiz Raja <moraja@cisco.com>
8 years agoRemove DatastoreContext#getDataStoreType() 43/30443/4
Robert Varga [Tue, 1 Dec 2015 16:55:22 +0000 (17:55 +0100)]
Remove DatastoreContext#getDataStoreType()

This method should not be used anywhere, remove it. Also fix all callers
to use getDataStoreName().

Change-Id: I3c9761951df335a1b3925f3756ff0fb90616a614
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-1014: convert IMDS 37/31137/2
Robert Varga [Thu, 10 Dec 2015 13:07:12 +0000 (14:07 +0100)]
BUG-1014: convert IMDS

This patch fixes the IMDS to properly pass down the TreeType.

Change-Id: I724fac68e62c58ed71eefbf03d50c82fb8d4a4e7
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-1014: pass proper TreeType to DataTreeFactory 69/29669/12
Robert Varga [Fri, 13 Nov 2015 17:28:54 +0000 (18:28 +0100)]
BUG-1014: pass proper TreeType to DataTreeFactory

Convert the LogicalStoreType into a TreeType and pass it down to the
DataTreeFactory, thus ensuring the resulting DataTree is aware of which
YANG store (CONFIG or OPER) it should enforce.

Change-Id: Ibe9d16161db11f564823df2bf1e73b78f21c4f98
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBug 4774: Add Tx ID to logging on Tx chain failures 17/31317/2
Tom Pantelis [Mon, 14 Dec 2015 19:17:12 +0000 (14:17 -0500)]
Bug 4774: Add Tx ID to logging on Tx chain failures

To help with debugging, it's useful to see the tx ID when a create fails
due to previous tx not ready.

Change-Id: I0547048ea62340a0297affed3512271908eba65a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoHandle leader change on ForwardedReadyTransaction in Shard 71/31171/3
Tom Pantelis [Fri, 11 Dec 2015 00:41:00 +0000 (19:41 -0500)]
Handle leader change on ForwardedReadyTransaction in Shard

When the ShardWriteTransaction actor sends the ForwardedReadyTransaction
to the Shard, if the local shard is no longer the leader it still tries
to commit the transaction. Replication fails and it ends up timing out
but a side effect is that it persista a new log entry which isn't good.

Therefore I added logic similar as was done with ReadyLocalTransaction
to forward to the leader. For ReadyLocalTransaction, a special
serializer was added to marshal it over the wire as a BatchedModifications
message. Rather then creating another serializer, I converted the
ForwardedReadyTransaction instance to a ReadyLocalTransaction instance.

Change-Id: Ia44e86606846f2af9599ad222b7dcae1bd0cf804
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoMove Tx ready call from ShardWriteTransaction to Shard 70/31170/2
Tom Pantelis [Thu, 10 Dec 2015 23:31:21 +0000 (18:31 -0500)]
Move Tx ready call from ShardWriteTransaction to Shard

On ready, the ShardWriteTransaction actor calls ready on the
ReadWriteShardDataTreeTransaction to obtain the ShardDataTreeCohort
and passes it with the ForwardedReadyTransaction message sent to
the Shard. Internally the ReadWriteShardDataTreeTransaction accesses
its parent, which is either the ShardDataTree or a ShardDataTreeTransactionChain,
to obtain the ShardDataTreeCohort. The parent holds unsynchronized
internal Shard state and is potentially unsafe to indirectly leak to the
transaction actor. This isn't an issue with the ShardDataTree b/c
finishTransaction doesn't access internal state but
ShardDataTreeTransactionChain does.

To be safe, we need to move the ready call to the Shard. Therefore, the
ReadWriteShardDataTreeTransaction instance is now passed with the
ForwardedReadyTransaction and the ShardCommitCoordinator now calls
ready.

Change-Id: I59295936944326b68506380519f8ade3b11164d9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBUG-4514: clear destroyed modules 98/31298/2
Robert Varga [Mon, 14 Dec 2015 20:03:11 +0000 (21:03 +0100)]
BUG-4514: clear destroyed modules

When the transaction concludes we do not need to know the destroyed
modules anymore. Clear them out as part of the close sequence.

Change-Id: Ia2a43ed424d96a99cc27df7b685e6abf7393f8a3
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAdd RaftActorServerConfigurationSupport.raftActor 11/30511/2
Gary Wu [Wed, 2 Dec 2015 21:34:47 +0000 (13:34 -0800)]
Add RaftActorServerConfigurationSupport.raftActor

Add raftActor as a field to
RaftActorServerConfigurationSupport to avoid passing
raftActor around through all the method calls.

Change-Id: I19eb16877af98e9e05ec698c321081e211a7e572
Signed-off-by: Gary Wu <gary.wu1@huawei.com>
8 years agoBug 2187: Implement add-replicas-for-all-shards RPC 22/31022/4
Tom Pantelis [Tue, 8 Dec 2015 13:38:47 +0000 (08:38 -0500)]
Bug 2187: Implement add-replicas-for-all-shards RPC

Implemented the add-replicas-for-all-shards RPC. The yang RPC definition
was changed to return a list of results for each shard.

In the unit test I added a shard config dynamically to the new replica
member that doesn't exist in the leader to test a replica failure case.
This revealed an issue for FindPrimary where both member nodes forwarded the
RemoteFindPrimary message back and forth to each other as neither had
a local replica. To fix this, I added a visitedAddresses set to the
RemoteFindPrimary message to prevent the endless mutual recursion.

Change-Id: Icb0329db2c935f9825b81f593b83bdab13fa6b52
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBug 2187: Prevent non-voting member from initiating elections 47/30947/2
Tom Pantelis [Tue, 8 Dec 2015 01:14:11 +0000 (20:14 -0500)]
Bug 2187: Prevent non-voting member from initiating elections

Change-Id: Id6359e6af5ff7389e1707e683310d103b167b402
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBug 2187: Timeout the Persist state 93/30493/6
Tom Pantelis [Tue, 1 Dec 2015 12:59:13 +0000 (07:59 -0500)]
Bug 2187: Timeout the Persist state

On add/remove server, if replication consensus isn't reached in the
Persist state, any pending or future operations will remain queued
until they eventually timeout on the caller side with no response. If
consensus is eventually reached, the pending operations would get
processed even though the caller is gone.

To alleviate this, I added a timer to the Persist state (2 * election
timeout). If it times out, pending operations are failed with a
PRIOR_REQUEST_CONSENSUS_TIMEOUT response. Also future operations are
failed if the timeout occurred.

Change-Id: I83ae528d6bec3fb8f8e3da7c5fd4ca75cfeeb4d5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoCorrect .gitreview (paoject -> project) 69/31269/2
Stephen Kitt [Mon, 14 Dec 2015 12:23:22 +0000 (13:23 +0100)]
Correct .gitreview (paoject -> project)

Change-Id: Ie2894e2c4cf46ccb0c72d4c7521e0fb32a98df0b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoAdded support for data store type (OPERATIONAL or CONFIG or BOTH) 40/31240/3
Jan Medved [Mon, 14 Dec 2015 01:38:22 +0000 (17:38 -0800)]
Added support for data store type (OPERATIONAL or CONFIG or BOTH)

Change-Id: I33e59fd4fdab2058ce863643f84fede50e79271e
Signed-off-by: Jan Medved <jmedved@cisco.com>
8 years agoBUG-4514: do not retain old internal info 75/31075/2
Robert Varga [Wed, 9 Dec 2015 14:13:35 +0000 (15:13 +0100)]
BUG-4514: do not retain old internal info

Retaining this information past second phase commit leads to it being
retained via dependencyResolver. Thus a series of reconfigurations will
invariably retain the complete history, which is completely wasteful and
constitutes a memory leak (with GC chains of ~1800 hops observed).

Change-Id: Id67b8813a1d55b36f0b55a1c96099b906bf313ad
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-1014: clean up DatastoreContext.dataStoreType() 68/29668/12
Robert Varga [Fri, 13 Nov 2015 17:15:08 +0000 (18:15 +0100)]
BUG-1014: clean up DatastoreContext.dataStoreType()

This is not really a type, but rather a name. Introduce
logicalStoreType() and dataStoreName() to disambiguate the two uses.

Change-Id: Ibd454ce1dd4428908ada92cb504c478d10ace779
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoAlign commons-net and jolokia with odlparent 48/28848/5
Stephen Kitt [Tue, 27 Oct 2015 14:52:43 +0000 (15:52 +0100)]
Align commons-net and jolokia with odlparent

Remove controller's overrides of commons-net and jolokia; this
upgrades:
* commons-net 3.0.1 -> 3.3
* joloka 1.1.4 -> 1.3.1

Change-Id: I76b787934740b0024bdc4020527f6a8b5dd01c3c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoRemove CompositeModification field in ShardWriteTransaction 69/31169/1
Tom Pantelis [Wed, 9 Dec 2015 17:12:05 +0000 (12:12 -0500)]
Remove CompositeModification field in ShardWriteTransaction

The CompositeModification field no longer needs to be passed with the
ForwardedReadyTransaction message so remove it.

Change-Id: Ieae3f3898d33f0f1e2bee720e2d3ff77ef80b73e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoRemoved unused Modification field in ForwardedReadyTransaction 68/31168/1
Tom Pantelis [Wed, 9 Dec 2015 17:00:30 +0000 (12:00 -0500)]
Removed unused Modification field in ForwardedReadyTransaction

The Modification field is no longer used.

Change-Id: I1b0ace3cf7a663fa3c14da1b5785fc05b77203bc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoConvert all tests that use ForwardReadyTransaction to use BatchedModifications 15/29715/6
Moiz Raja [Sun, 15 Nov 2015 20:23:13 +0000 (12:23 -0800)]
Convert all tests that use ForwardReadyTransaction to use BatchedModifications

The ShardTests that cover various scenarios were all using ForwardedReadyTransaction
which I have now migrated to use BatchedModifications. This removes most direct
usages of this message.

Change-Id: I7b3eae972dfa3daf30d24795fc3f34a699f98eab
Signed-off-by: Moiz Raja <moraja@cisco.com>
8 years agoMake karaf-empty a POM package 28/31128/2
Stephen Kitt [Thu, 10 Dec 2015 09:55:56 +0000 (10:55 +0100)]
Make karaf-empty a POM package

opendaylight-karaf-empty is currently a (default) JAR package, which
causes maven-install-plugin to try to install a JAR at all costs. It
ends up copying pom.xml to opendaylight-karaf-empty-....jar which
breaks anything then processing the JARs and expecting them to be
valid (e.g. for signing). Declaring that opendaylight-karaf-empty is a
POM package still produces the Karaf distributions along with the POM,
but avoids generating an invalid JAR.

Change-Id: I766acd4fd12002a05968b286a5290461c409c92e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
8 years agoBUG-4626: create AbstractNormalizedNodeDataOutput 08/31008/5
Robert Varga [Tue, 8 Dec 2015 13:02:50 +0000 (14:02 +0100)]
BUG-4626: create AbstractNormalizedNodeDataOutput

Create an internal NormalizedNodeDataOutput implementation for reuse of
code between stream versions.

Change-Id: I60e68fe150ba49d37a6821b057b9ef93a8e600e5
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG-4626: Introduce NormalizedNodeData{Input,Output} 72/30872/10
Robert Varga [Sun, 6 Dec 2015 22:07:36 +0000 (23:07 +0100)]
BUG-4626: Introduce NormalizedNodeData{Input,Output}

Introduce the interfaces that are actually consumed, so that the
external interface is accurately captured.

Change-Id: I8ba93c279cfb4de063afb9c1078e97080e735e44
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoBUG-4626: Split out stream token types 83/30283/12
Robert Varga [Thu, 26 Nov 2015 11:46:59 +0000 (12:46 +0100)]
BUG-4626: Split out stream token types

Move token types and version into a dedicated internal class, adding
some documentation and introducing planned token types.

Also adds validation of stream version on reception, so that parsing
fails predictably in case of sender doing the worng thing and sending us
an unrecognized version.

Change-Id: I85fd9615b897e0fe4addb7f1807416d7bfe1b903
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoSet config pusher thread to daemon 08/30908/3
Tom Pantelis [Sun, 6 Dec 2015 17:23:04 +0000 (12:23 -0500)]
Set config pusher thread to daemon

Change-Id: Ida1992884e3b6be1e8188e9f6c8393b0baa08db0
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBug 2187: Add datastoreType to add-shard-replica RPC 59/30559/2
Tom Pantelis [Thu, 3 Dec 2015 14:47:27 +0000 (09:47 -0500)]
Bug 2187: Add datastoreType to add-shard-replica RPC

Change-Id: I4d24063d9fac5f23d207f621879c4369819c0bd5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoBug 3874: Support of yang modeled AnyXML 50/29550/6
Peter Kajsa [Wed, 11 Nov 2015 13:53:34 +0000 (14:53 +0100)]
Bug 3874: Support of yang modeled AnyXML

Controller changes due to anyXml support in Yangtools.

Notice: Yangtools patch and Controller patch should be merged at once.

Change-Id: I4ff9ef4a0e03f6ad9b30c2a35b97b3a6fa1793d9
Signed-off-by: Peter Kajsa <pkajsa@cisco.com>
8 years agoBUG-4514: clear oldModule/oldInstance when no longer needed 87/30487/3
Robert Varga [Wed, 2 Dec 2015 14:20:22 +0000 (15:20 +0100)]
BUG-4514: clear oldModule/oldInstance when no longer needed

When we acquire a new instance we no longer need the old module nor
instance. Failing to clear these references leads to slow memory leak,
as we retain the complete history of modules as transactions are being
made.

Change-Id: I42899176d335e5f6ac66ecb1dfe080c4dd14ab2a
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoClean NormalizedNodeSerializer up 10/30410/3
Robert Varga [Mon, 30 Nov 2015 23:27:22 +0000 (00:27 +0100)]
Clean NormalizedNodeSerializer up

The map holding deserializer functions should be an immutable constant.
Create a temporary EnumMap and then wrap it via an immutable facade.
Also make the function defitions denser.

Change-Id: I9adc4151c222ca32902ccd59902cbea1c9100b74
Signed-off-by: Robert Varga <robert.varga@pantheon.sk>
8 years agoRevert "Revert "Remove obsolete artifacts from commons.opendaylight"" 94/27494/3
Ed Warnicke [Sat, 26 Sep 2015 19:01:12 +0000 (12:01 -0700)]
Revert "Revert "Remove obsolete artifacts from commons.opendaylight""

This reverts commit 4030381d1997fd5d4764c826632e5f283c2338fd.

This reverts gerrit https://git.opendaylight.org/gerrit/#/c/27467/

Change-Id: I54b0b975956a95d215096397ad881e0919774836
Signed-off-by: Ed Warnicke <hagbard@gmail.com>