controller.git
8 years agoTests for CDS DataTreeChangedListener 52/17652/12
Jan Hajnar [Thu, 2 Apr 2015 15:26:46 +0000 (17:26 +0200)]
Tests for CDS DataTreeChangedListener

* implemented tests

Change-Id: I6cc8f4011a056f19991165a5b324b3999d25a951
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
8 years agoMerge "BUG 3045 : Use non-strict parsing in hello message."
Tony Tkacik [Fri, 24 Apr 2015 10:18:05 +0000 (10:18 +0000)]
Merge "BUG 3045 : Use non-strict parsing in hello message."

8 years agoMerge "Create transaction on the backend datastore only when neccessary"
Tony Tkacik [Fri, 24 Apr 2015 10:09:48 +0000 (10:09 +0000)]
Merge "Create transaction on the backend datastore only when neccessary"

8 years agoMerge "Reduce non-existent Tx chain logging on close in ShardDataTree"
Moiz Raja [Fri, 24 Apr 2015 10:03:18 +0000 (10:03 +0000)]
Merge "Reduce non-existent Tx chain logging on close in ShardDataTree"

8 years agoMerge "Return local shard's DataTree from ActorContext#findPrimaryShardAsync"
Moiz Raja [Fri, 24 Apr 2015 10:02:16 +0000 (10:02 +0000)]
Merge "Return local shard's DataTree from ActorContext#findPrimaryShardAsync"

8 years agoMerge "Tests for DOMDataTreeListener"
Tom Pantelis [Fri, 24 Apr 2015 02:53:32 +0000 (02:53 +0000)]
Merge "Tests for DOMDataTreeListener"

8 years agoMerge "Moved legacy Notification implementation to compat package."
Tom Pantelis [Fri, 24 Apr 2015 02:52:17 +0000 (02:52 +0000)]
Merge "Moved legacy Notification implementation to compat package."

8 years agoMerge "Replaced Helium Notification Broker with new Notifcation Broker."
Tom Pantelis [Fri, 24 Apr 2015 02:51:38 +0000 (02:51 +0000)]
Merge "Replaced  Helium Notification Broker with new Notifcation Broker."

8 years agoMerge "Make TransactionProxy.isRootPath() static"
Tom Pantelis [Fri, 24 Apr 2015 00:42:10 +0000 (00:42 +0000)]
Merge "Make TransactionProxy.isRootPath() static"

8 years agoMerge "Bug 3024 - Restconf PUT exception when top level node is from augmentation"
Tony Tkacik [Thu, 23 Apr 2015 21:15:25 +0000 (21:15 +0000)]
Merge "Bug 3024 - Restconf PUT exception when top level node is from augmentation"

8 years agoMerge "IMDS: trim down commit overhead"
Tony Tkacik [Thu, 23 Apr 2015 18:01:05 +0000 (18:01 +0000)]
Merge "IMDS: trim down commit overhead"

8 years agoMerge "Publish SnapshotBacked transactions"
Tony Tkacik [Thu, 23 Apr 2015 18:00:30 +0000 (18:00 +0000)]
Merge "Publish SnapshotBacked transactions"

8 years agoBug 3024 - Restconf PUT exception when top level node is from 65/18765/6
Jan Hajnar [Tue, 21 Apr 2015 17:11:52 +0000 (19:11 +0200)]
Bug 3024 - Restconf PUT exception when top level node is from
augmentation

* added check for PUT into JsonNormalizedNodeBodyReader. If method is
PUT then data are unwraped from augmentations/choice nodes
* added wrapping of augmentation nodes when using XmlNormalizedNodeBodyReader
* commented out check for namespace in createConfigurationData (it should be
moved to parse stage)
* both XmlNormalizedNodeBodyReader and JsonNormalizedNodeBodyReader
should now produce the same normalized node data and paths for
equivalent XML and JSON input.

Change-Id: I21f4594d20170f33177cbae00791b81f6ae640b2
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
8 years agoMerge "Fix ShardTest#testCreateSnapshot unit test failures"
Moiz Raja [Thu, 23 Apr 2015 17:08:12 +0000 (17:08 +0000)]
Merge "Fix ShardTest#testCreateSnapshot unit test failures"

8 years agoMerge "CDS: switch persistence to persisting the candidates"
Moiz Raja [Thu, 23 Apr 2015 17:07:28 +0000 (17:07 +0000)]
Merge "CDS: switch persistence to persisting the candidates"

8 years agoCreate transaction on the backend datastore only when neccessary 39/18839/3
Moiz Raja [Wed, 22 Apr 2015 13:42:05 +0000 (06:42 -0700)]
Create transaction on the backend datastore only when neccessary

I've borrowed a bunch of code from the data broker because I needed to modify
the code for lazy transaction creation which needed me to pass around the
factories for creating the transaction on the appropriate store.

Basic tests are in place for now which ensure
that we do not create transactions on all the stores when not needed and that on
submit we only have cohorts for the transactions that we created.

The data broker still goes through the three phase commit but since now this has
been optimized with the direct commit enhancement on the datastore itself it should
not matter if we call one method or 4 as far as message passing goes. Calling the 4 methods
may result in extra object creation and such which could be avoided. I would put that in
a follow up commit.

Change-Id: Id77bb1642748e7df15e084a3f0b5e580783f2f8d
Signed-off-by: Moiz Raja <moraja@cisco.com>
8 years agoMake TransactionProxy.isRootPath() static 18/18918/1
Robert Varga [Thu, 23 Apr 2015 13:20:23 +0000 (15:20 +0200)]
Make TransactionProxy.isRootPath() static

Its result depends only on the argument, so make it static.

Change-Id: I8a117974a57f4f1e96d06b6223152387d33519d4
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoFix TestModel whitespace and warning 14/18914/2
Robert Varga [Thu, 23 Apr 2015 11:25:43 +0000 (13:25 +0200)]
Fix TestModel whitespace and warning

Migrates the new yang parser interfaces and cleans up whitespace to
follow coding style.

Change-Id: Iefe7893e51d24192b2f4ce4da14b351d348e76ea
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoIMDS: trim down commit overhead 46/18846/5
Robert Varga [Wed, 22 Apr 2015 14:17:57 +0000 (16:17 +0200)]
IMDS: trim down commit overhead

After refactoring things out it is quite obvious that we can skip adding
a listener to the commit cohort when committing a chained transaction.

Extract the inner class from InMemoryDOMDataStore so it can be reused
and subclass it in ChainedTransactionCommitImpl. That makes it also
obvious our commit cannot fail.

Change-Id: I71d9fa60cf63d826ba066c381d8db91af7f8f31e
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoPublish SnapshotBacked transactions 43/18843/6
Robert Varga [Wed, 22 Apr 2015 12:36:13 +0000 (14:36 +0200)]
Publish SnapshotBacked transactions

IMDS-internal transaction implementations can be used by the CDS
frontend. Fix them up for publishing and make them available in SPI as a
Beta API.

Change-Id: Iaa4cd6792db0f262ce41281280f2ccfde6146532
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoCDS: switch persistence to persisting the candidates 91/18591/27
Robert Varga [Sat, 18 Apr 2015 22:35:57 +0000 (00:35 +0200)]
CDS: switch persistence to persisting the candidates

With us being in control of the DataTree, we can now use
DataTreeCandidate for replication and persistence. Add the appropriate
payload and add appropriate hooks.

Exposing the DataTreeCandidate from the cohort is actually pushing
towards having our own cohort type -- ShardDataTreeCohort. With that we
can get rid of DOMStoreThreePhaseCommitCohort, so eliminate its mention
to prevent accidental leakage.

Change-Id: I37a22b445f955330193c762894764feee94bebdb
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoBUG 3045 : Use non-strict parsing in hello message. 52/18852/3
Tomas Cere [Wed, 22 Apr 2015 14:46:31 +0000 (16:46 +0200)]
BUG 3045 : Use non-strict parsing in hello message.

Made NetconfMessageTransformer use non-strict parsing mode when parsing
hello message.

Change-Id: I02cbaa1dccc82409292e1c3f186ad05877297135
Signed-off-by: Tomas Cere <tcere@cisco.com>
8 years agoFix ShardTest#testCreateSnapshot unit test failures 79/18879/4
Tom Pantelis [Wed, 22 Apr 2015 10:54:07 +0000 (06:54 -0400)]
Fix ShardTest#testCreateSnapshot unit test failures

This unit test is failing on jenkins quite often due to a timing issue
with the tests resulting from recent changes. Basically akka uses a
calling thread dispatcher by default so the call to
createSnapshotProcedure in the SnapshotManager may result in a direct
call to persist which fails b/c it's still in the Idle state. Moving the
setting of currentState to CREATING prior to calling
createSnapshotProcedure fixes the issue.

Change-Id: If68333d042896e25fd3f85dd16da7b84ca56d944
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoReturn local shard's DataTree from ActorContext#findPrimaryShardAsync 83/18783/3
Tom Pantelis [Tue, 21 Apr 2015 21:03:23 +0000 (17:03 -0400)]
Return local shard's DataTree from ActorContext#findPrimaryShardAsync

For upcoming patches to optimize local shard transactions, we need
access to the Shard's local DataTree in the TransactionProxy. This can
be returned by ActorContext#findPrimaryShardAsync along with the shard's
ActorSelection.

I added a new class PrimaryShardInfo that encapsulates the shard's
ActorSelection and an Optional whose value contains the Shard's DataTree
if the shard actor is local to the caller.

ActorContext#findPrimaryShardAsync now returns a Future<PrimaryShardInfo>.
Currently, the PrimaryShardInfo contains an absent Optional but will be
implemented to contain the local Shard's DataTree in a subsequent patch.
Another subsequent patch will utilize the DataTree in the
TransactionProxy.

Change-Id: I9bd6425d597c307391d09554fe9ccebd03593180
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoReduce non-existent Tx chain logging on close in ShardDataTree 87/18887/2
Tom Pantelis [Wed, 22 Apr 2015 16:53:12 +0000 (12:53 -0400)]
Reduce non-existent Tx chain logging on close in ShardDataTree

In ShardDataTree#closeTransactionChain, if the Tx chain doesn't exist it
emits a warning. However the CloseTransactionChain message is
broadcasted to all shards so there will always be a non-existent chain
on some shards so I reduced the log level to debug.

Change-Id: Ia4243c4a2987fa4f43d272a7435a9d7b5d43445b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoFix compile errors in NetconfDeviceSimulator 89/18889/1
Tom Pantelis [Wed, 22 Apr 2015 17:44:27 +0000 (13:44 -0400)]
Fix compile errors in NetconfDeviceSimulator

Jenkins builds are failing due to compile errors in
NetconfDeviceSimulator apparently due to recent yangtools changes.

Change-Id: If48d23f8907f848def5f448bb95f10fd5486f89e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
8 years agoTests for DOMDataTreeListener 54/17554/7
Jan Hajnar [Wed, 1 Apr 2015 15:06:23 +0000 (17:06 +0200)]
Tests for DOMDataTreeListener

* added tests for DOMDataTreeListener registration on notifications
retrieval

Change-Id: I65135f77fcb09cb34579433718193873d84d3282
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
8 years agoCDS: use internal DataTree instance 98/18498/32
Robert Varga [Thu, 16 Apr 2015 14:30:47 +0000 (16:30 +0200)]
CDS: use internal DataTree instance

Instead of using a captive InMemoryDataStore instance, which is geared
toward interaction with a DOMDataBroker, use the baseline DataTree
instance and utility classes for implementing the data store behavior.

Since most of CDS is geared for interactions with the usual DOMStore
interfaces, this patch provides a set of bare-bone workalike classes,
but taking advantage of the safeties provided by the AKKA actor system.

Immediate benefit should be a speed up in backend processing, as we
eliminate intermediate Future instances when accessing and manipulating
data.

We also gain explicit control over DataTree lifecycle, which enables us
switching to DataTreeCandidate as the replication and persistence unit,
as opposed to individual modifications.

Change-Id: I031d0ed4d82dcc923fd377c13fefba2819923f9b
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMoved legacy Notification implementation to compat package. 19/18819/2
Tony Tkacik [Wed, 22 Apr 2015 11:04:39 +0000 (13:04 +0200)]
Moved legacy Notification implementation to compat package.

Change-Id: Iba88a62c1d0327c69a16004b123cb0e5749f8ea8
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoReplaced Helium Notification Broker with new Notifcation Broker. 55/18255/5
Tony Tkacik [Wed, 8 Apr 2015 11:54:41 +0000 (13:54 +0200)]
Replaced  Helium Notification Broker with new Notifcation Broker.

Change-Id: I01b249b0e7d412d0075f7bb0727e146c2e109fc7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoClustering: Expose PathArgument writer 93/18593/13
Robert Varga [Sun, 19 Apr 2015 01:03:10 +0000 (03:03 +0200)]
Clustering: Expose PathArgument writer

In our upcoming clustering work we will be serializing
DataTreeCandidate, which is a PathArgument-indexed tree structure.
Expose PathArgument writer and read methods for later use. Also fix
NormalizedNodeOutputStreamWriter not calling flush() on close().

Change-Id: Ided34a8bc1bc77b5ef357346e3d5b057bffc40c1
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoActive ennunciate for AD-SAL only on JDK 7 99/18799/3
Tony Tkacik [Wed, 22 Apr 2015 08:01:07 +0000 (08:01 +0000)]
Active ennunciate for AD-SAL  only on JDK 7

Change-Id: I204ea5feb6a1df103d9321c88eec958e1d1ee263
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
8 years agoMerge "Elide front-end 3PC for single-shard Tx"
Moiz Raja [Tue, 21 Apr 2015 20:25:27 +0000 (20:25 +0000)]
Merge "Elide front-end 3PC for single-shard Tx"

8 years agoMerge "BUG-3033: DataBroker should extend DataTreeChangeService"
Tony Tkacik [Tue, 21 Apr 2015 13:25:28 +0000 (13:25 +0000)]
Merge "BUG-3033: DataBroker should extend DataTreeChangeService"

8 years agoBUG-3033: DataBroker should extend DataTreeChangeService 37/18737/1
Robert Varga [Tue, 21 Apr 2015 11:49:40 +0000 (13:49 +0200)]
BUG-3033: DataBroker should extend DataTreeChangeService

The implementation already implements it, but users are not awat of this
capability, as they need to use an explicit cast. Fix it by requiring
all DataBroker implementations to also provide DataTreeChangeService.

Change-Id: Idf61a665b303e03106c223f9bacd9a827b2d9046
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoSimplify instantiation of NormalizedNodeInputStreamReader 34/18734/1
Robert Varga [Tue, 21 Apr 2015 11:35:19 +0000 (13:35 +0200)]
Simplify instantiation of NormalizedNodeInputStreamReader

Constructor which takes a DataInput does not need to throw, so remove
that declaration. That makes it easier for users to instantiate it.

Change-Id: Ia9267c6610fe2ebbfa2cb24a4475bba5c486f6df
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMerge "Add assertNotNull to prevent null analysis warnings"
Tony Tkacik [Tue, 21 Apr 2015 10:41:20 +0000 (10:41 +0000)]
Merge "Add assertNotNull to prevent null analysis warnings"

8 years agoMerge "Improve xml lookup in edit-config rpc for md-sal"
Tony Tkacik [Tue, 21 Apr 2015 07:41:12 +0000 (07:41 +0000)]
Merge "Improve xml lookup in edit-config rpc for md-sal"

8 years agoMerge "Bug 2998 - RESTCONF not recogizing top-level input."
Tony Tkacik [Tue, 21 Apr 2015 07:40:38 +0000 (07:40 +0000)]
Merge "Bug 2998 - RESTCONF not recogizing top-level input."

8 years agoMerge "Cleanup: Remove passing around of DataPersistenceProvider"
Moiz Raja [Tue, 21 Apr 2015 07:15:45 +0000 (07:15 +0000)]
Merge "Cleanup: Remove passing around of DataPersistenceProvider"

8 years agoMerge "Address comment in gerrit 17266"
Moiz Raja [Tue, 21 Apr 2015 07:15:35 +0000 (07:15 +0000)]
Merge "Address comment in gerrit 17266"

8 years agoMerge "Bug 2948: Perform create snapshot synchronously"
Moiz Raja [Tue, 21 Apr 2015 07:15:28 +0000 (07:15 +0000)]
Merge "Bug 2948: Perform create snapshot synchronously"

8 years agoMerge "Netconf testtool stress client"
Tony Tkacik [Mon, 20 Apr 2015 15:23:49 +0000 (15:23 +0000)]
Merge "Netconf testtool stress client"

8 years agoMerge "BUG-3018: report DataTreeChangeListener initial state"
Tony Tkacik [Mon, 20 Apr 2015 15:12:52 +0000 (15:12 +0000)]
Merge "BUG-3018: report DataTreeChangeListener initial state"

8 years agoNetconf testtool stress client 80/18580/3
Maros Marsalek [Sat, 18 Apr 2015 17:44:46 +0000 (19:44 +0200)]
Netconf testtool stress client

Change-Id: I4bd351fe17e596e9153a48bf233432b8c8b19ea9
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
8 years agoBUG-3018: report DataTreeChangeListener initial state 85/18585/7
Robert Varga [Sat, 18 Apr 2015 19:26:27 +0000 (21:26 +0200)]
BUG-3018: report DataTreeChangeListener initial state

Once we have make callout to AbstractDOMStoreTreeChangePublisher, also
examine our current state to see if we should report an initial event.
Requires https://git.opendaylight.org/gerrit/18583 in yangtools.

Change-Id: If6ccdb32057d1cf54bfc83888bf1540142c3ec7f
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoImprove DataExistsReply construction 68/18568/3
Robert Varga [Fri, 17 Apr 2015 21:29:18 +0000 (23:29 +0200)]
Improve DataExistsReply construction

DataExistsReply is immutable and has low cardinality. Pre-construct the
two possible instances and the two possible serializable instances and
expose them through a static factory method, which reuses these
instances, thus lowering garbage creation. Also remove unneeded
autoboxing of boolean to Boolean in ShardTransaction.

Change-Id: I2b1e0db5abb00a7b98eda4c3cc21ad35b9a921c6
Signed-off-by: Robert Varga <rovarga@cisco.com>
8 years agoMerge "Parse Xml Netconf msgs without defer-node-expansion option"
Tony Tkacik [Mon, 20 Apr 2015 08:28:55 +0000 (08:28 +0000)]
Merge "Parse Xml Netconf msgs without defer-node-expansion option"

8 years agoMerge "Fix compilation with JDK8"
Tony Tkacik [Mon, 20 Apr 2015 08:24:07 +0000 (08:24 +0000)]
Merge "Fix compilation with JDK8"

8 years agoBug 2998 - RESTCONF not recogizing top-level input. 05/18605/2
Jan Hajnar [Fri, 17 Apr 2015 14:42:17 +0000 (16:42 +0200)]
Bug 2998 - RESTCONF not recogizing top-level input.

* added choice resolution when top level element is from case node.
Resolved choice is then fed into parser.

Change-Id: Iadea8cc3d190afb13fa2447edd05abd8708e591a
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
8 years agoImprove xml lookup in edit-config rpc for md-sal 89/18589/2
Maros Marsalek [Sat, 18 Apr 2015 21:10:38 +0000 (23:10 +0200)]
Improve xml lookup in edit-config rpc for md-sal

Lookup the attributes of rpc in xml payload directly to improve lookup
performance instead of using utility XmlElement class

Change-Id: I47e8f47f279ccbd271e5ed903a352ebbc307d0f9
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoAdd assertNotNull to prevent null analysis warnings 81/18581/2
Robert Varga [Sat, 18 Apr 2015 15:40:19 +0000 (17:40 +0200)]
Add assertNotNull to prevent null analysis warnings

Eclipse can perform null-derefence analysis, which triggers a warning
here.

Change-Id: I42f85f98009717214c8029b5517b1142431dfbc8
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoParse Xml Netconf msgs without defer-node-expansion option 79/18579/1
Maros Marsalek [Fri, 17 Apr 2015 11:46:21 +0000 (13:46 +0200)]
Parse Xml Netconf msgs without defer-node-expansion option

The defer-node-expansion expands inner nodes on traversal, but its suitable for
bigger xmls (100k bytes) and messages that are not fully traversed. This is not
the case with incomming netconf rpc.

Source:
https://xerces.apache.org/xerces2-j/faq-performance.html

Tested:
Netconf server pipeline performance was improved by 5-6%

Change-Id: I3bd4b917841f0ebe212ff753d6e0f655d618968c
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
9 years agoFix compilation with JDK8 78/18578/1
Robert Varga [Sat, 18 Apr 2015 11:31:02 +0000 (13:31 +0200)]
Fix compilation with JDK8

Direct cast was not working, so restructure it a bit.

Change-Id: I58bb6ab2d636cdfe15d1a7ed9c47c393ff6a6920
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoElide front-end 3PC for single-shard Tx 92/18392/7
Tom Pantelis [Fri, 17 Apr 2015 22:53:21 +0000 (18:53 -0400)]
Elide front-end 3PC for single-shard Tx

A new method, directCommit, was added to TransactionContext.
In TransactionContextImpl#directCommit, it sends the final ready
BatchedModifications message as before but with a new flag,
doCommitOnReady, set to true. In ShardCommitCoordinator, if
doCommitOnReady is true, it immediately initiates the canCommit
phase without waiting for the CanCommitTransaction message.

In ShardWriteTransaction, if doCommitOnReady is true, it sets a new
similar flag in the ForwardedReadyTransaction message. Similarly,
the ShardCommitCoordinator immediately initiates the canCommit phase.
This code path is executed for read-write transactions as they still
utilize the transaction actor.

In TransactionProxy, when only 1 shard was accessed, it creates a
SingleCommitCohortProxy instance. This class also implements
DOMStoreThreePhaseCommitCohort but the 3 phases are essentially a
no-op with direct commit. The canCommit phase simply waits for the direct
commit Future to complete and returns success (true). If a failure occurs
from the Shard, the exception is propagated to the caller.

For backwards compatibility, we still need the
ThreePhaseCommitCohortProxy even with a single-shard transaction. A
complication with this is that TransactionProxy#ready may not know
immediately if it can do direct commit or not because it may not have the
TransactionContext instance yet due to the async nature of things.
So in either case it still creates a SingleCommitCohortProxy. When it gets
the callback to finally complete the operation, it checks the
TransactionContext to see if it supports direct commit (only
pre-Lithium versions won't). If supported, it calls directCommit, otherwise
readyTransaction. In the SingleCommitCohortProxy, on successful
completion of the ready/direct commit Future, it checks the response
type. If it's an ActorSelection then it needs to do 3-phase commit
so it creates and delegates to a ThreePhaseCommitCohortProxy.

I moved the code in Shard#handleCommitTransaction to the
ShardCommitCoordinator as this is also needed for direct commit. I
also moved the handleForwardedReadyTransaction code into
ShardCommitCoordinator to make it easier to handle direct commit.

Change-Id: I40b04dd5abd24c78709598a5acfc16484e165427
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoExpose ResolveDataChangeEventsTask 24/18524/2
Robert Varga [Fri, 17 Apr 2015 10:27:50 +0000 (12:27 +0200)]
Expose ResolveDataChangeEventsTask

ListenerTree is already visible from implementation, this is a utility
class for taking advantage of this functionality.

Change-Id: Ia75d90f3729afb112da48264d5552fc3b0cb1d37
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBug 2351: Introduced LazySerializedDOMNotification 13/17913/4
Tony Tkacik [Wed, 8 Apr 2015 11:45:35 +0000 (13:45 +0200)]
Bug 2351: Introduced LazySerializedDOMNotification

Change-Id: I4a6c5c19b2d59050ddf01f92a76ef0d5add2bfb2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Notification Listener Adapter uses NotificationListenerInvoker"
Tom Pantelis [Fri, 17 Apr 2015 13:51:58 +0000 (13:51 +0000)]
Merge "Notification Listener Adapter uses NotificationListenerInvoker"

9 years agoBug 2907: Downgraded karaf maven plugin to 3.0.1 25/18525/1
Tony Tkacik [Fri, 17 Apr 2015 10:26:43 +0000 (12:26 +0200)]
Bug 2907: Downgraded karaf maven plugin to 3.0.1

Karaf Maven plugin 3.0.2 and 3.0.3 during installation
of boot features reinstalls already installed features
when it's referenced by other features.

This actually prolongs build and increases logs in
large amount - eg.
https://jenkins.opendaylight.org/releng/job/iotdm-integration-master/522/

Change-Id: I1fa1a1c4853becf49b790e3a4add56ca9d263ba0
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoDisabled logging bridge in ad-sal features. 88/18488/1
Tony Tkacik [Thu, 16 Apr 2015 21:12:08 +0000 (23:12 +0200)]
Disabled logging bridge in ad-sal features.

With Karaf 3.0.3 in place AD-SAL logging-bridge
created loop in logs, which polluted logs
with exponential prepending of prefix to
log messages.

During SingleFeatureTest run these logs
creates around 400MB of repeated log message
without any meaning.

Change-Id: I8896956c7a377eaf3139ba64bb70ce46a31e6ea3
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2907: Make sure we are properly bumped to Karaf 3.0.3 10/18410/3
Tony Tkacik [Thu, 16 Apr 2015 10:53:33 +0000 (12:53 +0200)]
Bug 2907: Make sure we are properly bumped to Karaf 3.0.3

Change-Id: Ic9303c71fcfc39849401a7cdaa24b44f3836067b
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoBug 2907: Fixed missing reference to parent pom. 03/18403/1
Tony Tkacik [Thu, 16 Apr 2015 09:38:36 +0000 (11:38 +0200)]
Bug 2907: Fixed missing reference to parent pom.

Change-Id: I9dc0bca738288d18a3943e8528f3ac81c5bbc07e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMerge "Bug 2358: Fixed warnings in Restconf"
Ed Warnicke [Thu, 16 Apr 2015 03:55:18 +0000 (03:55 +0000)]
Merge "Bug 2358: Fixed warnings in Restconf"

9 years agoBug 2907 - corrections for upgrade to karaf 3.0.3 93/15393/7
Ed Warnicke [Mon, 16 Feb 2015 01:35:40 +0000 (18:35 -0700)]
Bug 2907 - corrections for upgrade to karaf 3.0.3

Needs patch: https://git.opendaylight.org/gerrit/15391
from odlparent

So far this seems to work fine except for the issues
with aaa-authn's use of sqllite.

If you want to test with integration, you will need patch:
https://git.opendaylight.org/gerrit/15392

Change-Id: I34d9adf31562a0650abba015d19dd8c6958b2bf3
Signed-off-by: Ed Warnicke <eaw@cisco.com>
9 years agoMerge "Split out sal-akka-raft example"
Moiz Raja [Wed, 15 Apr 2015 18:29:20 +0000 (18:29 +0000)]
Merge "Split out sal-akka-raft example"

9 years agoMerge "Bug 2948: Recovered log entries not applied after prior snapshot"
Moiz Raja [Wed, 15 Apr 2015 18:26:20 +0000 (18:26 +0000)]
Merge "Bug 2948: Recovered log entries not applied after prior snapshot"

9 years agoMerge "BUG-2953: do not use a complete InMemoryDataStore"
Tony Tkacik [Wed, 15 Apr 2015 14:49:44 +0000 (14:49 +0000)]
Merge "BUG-2953: do not use a complete InMemoryDataStore"

9 years agoNotification Listener Adapter uses NotificationListenerInvoker 36/17836/5
Tony Tkacik [Tue, 7 Apr 2015 12:02:39 +0000 (14:02 +0200)]
Notification Listener Adapter uses NotificationListenerInvoker

Change-Id: I64bd1c031d979b087ad1dbc659020e1716213e42
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoMessage-bus - removed trailing witespaces of new tests for messagebus-impl 89/18189/5
Igor Bartak [Mon, 13 Apr 2015 11:52:07 +0000 (13:52 +0200)]
Message-bus - removed trailing witespaces of new tests for messagebus-impl

Change-Id: I0d3c23504ac2420e43d65a78abe50a761855e661
Signed-off-by: Igor Bartak <ibartak@cisco.com>
9 years agoSplit out sal-akka-raft example 00/18200/5
Robert Varga [Mon, 13 Apr 2015 13:54:23 +0000 (15:54 +0200)]
Split out sal-akka-raft example

The example should not be included in production code, so split it out
into a separate component.

Change-Id: Iacf4d57d5e0ec85a975f8611dab1524b6556ce39
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoMerge "Extracted NotificationInvokerImpl to separate class."
Tom Pantelis [Tue, 14 Apr 2015 12:12:07 +0000 (12:12 +0000)]
Merge "Extracted NotificationInvokerImpl to separate class."

9 years agoMerge "Unify sal-akka-raft version"
Tom Pantelis [Tue, 14 Apr 2015 12:03:23 +0000 (12:03 +0000)]
Merge "Unify sal-akka-raft version"

9 years agoUse Collections.emptyList() 01/18201/2
Robert Varga [Mon, 13 Apr 2015 14:31:28 +0000 (16:31 +0200)]
Use Collections.emptyList()

This fixes a warning about generic argument mismatch.

Change-Id: If856d00e21d3eaa333f57ada582ec4b3eb7b0d20
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoUnify sal-akka-raft version 99/18199/3
Robert Varga [Mon, 13 Apr 2015 13:53:34 +0000 (15:53 +0200)]
Unify sal-akka-raft version

Make sure the artifact is published, so we can reuse the same version.

Change-Id: I1dd1aac1d45e1ef2f27fe232cb59218651463618
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoBUG-2953: do not use a complete InMemoryDataStore 92/18192/3
Robert Varga [Mon, 13 Apr 2015 13:20:43 +0000 (15:20 +0200)]
BUG-2953: do not use a complete InMemoryDataStore

Aggregator functionality does not require sequencing or listener, but
rather simple manipulation. Instantiate a DataTree instead, simplifying
the class.

Change-Id: I1edc38f0722ddbd1145149bbc5efef5ab41b0146
Signed-off-by: Robert Varga <rovarga@cisco.com>
9 years agoExtracted NotificationInvokerImpl to separate class. 35/17835/3
Tony Tkacik [Tue, 7 Apr 2015 11:41:29 +0000 (13:41 +0200)]
Extracted NotificationInvokerImpl to separate class.

Change-Id: Ie7494e872200581ce6cf5dcae2088ab2afda3671
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
9 years agoCleanup: Remove passing around of DataPersistenceProvider 43/18143/2
Tom Pantelis [Sat, 11 Apr 2015 00:05:23 +0000 (20:05 -0400)]
Cleanup: Remove passing around of DataPersistenceProvider

Now that the DataPersistenceProvider instance is store in the
RaftActorContext, we no longer need to pass it to various other classes
methods that have access to the RaftActorContext instance.

Change-Id: Iccbfac82819451e28432e15f5eb970fded4b181e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAddress comment in gerrit 17266 37/18137/6
Tom Pantelis [Fri, 10 Apr 2015 21:08:06 +0000 (17:08 -0400)]
Address comment in gerrit 17266

As per comment in https://git.opendaylight.org/gerrit/#/c/17266/ , moved
check for snapshot messages to the else clause.

Change-Id: I84405dfb6c832058a1bcc041a539748f4499dd8f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoBug 2948: Perform create snapshot synchronously 14/18114/4
Tom Pantelis [Wed, 8 Apr 2015 07:32:15 +0000 (03:32 -0400)]
Bug 2948: Perform create snapshot synchronously

Performing the create snapshot phase asynchronously via sending
the CaptureSnapshot message may result in subsequent modifications
that are applied after the CaptureSnapshot message is sent but before
it's received to be included in the snapshot and also included as
unapplied entries in the snapshot. On recovery, the modifications
would be redundantly applied. This could result in data tree errors,
eg if a modification was a delete, the redundant apply would cause an
exception due to the non-existent node.

To avoid this, the SnapshotManager was changed to immediately call the
create procedure in the capture method instead of sending the
CaptureSnapshot message. The create procedure is now set in the
SnapshotManager by the RaftActorSnapshotMessageSupport. The Capturing
state was removed.

Change-Id: I0efe8966d83e019c9dd8a82799193ea7ac49ba65
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoBug 2948: Recovered log entries not applied after prior snapshot 13/18113/5
Tom Pantelis [Sat, 4 Apr 2015 03:39:52 +0000 (23:39 -0400)]
Bug 2948: Recovered log entries not applied after prior snapshot

Modified SnapshotManager#capture to obtain and cache the last journal sequence
number. On commit, the cached sequence number is used to delete
messages. This preserves any ApplyJournalEntries and ReplicatedLogEntry
messages that occur after the capture is initiated.

As a result of his change, we also have to obtain the unapplied entries
at the time the snapahot is initiated and not when we persist.
Otherwise, log entries persisted after the capture is initiated and
before it's persisted would be included in the snapshot's unapplied
list. On recovery, both entries would be recovered and added to the in-memory
journal resulting in duplicate entries.

These changes may result in a subsequent modification that is applied
after the snapshot is initiated to be included in the snapshot and also
persisted in the journal or included as unapplied in the snapshot. On
recovery, the modification entry would be redundantly applied. This could
result in data tree errors, eg if the modification was a delete, the
redundant apply would cause an exception due to the non-existent node.
We'll have to live with that - I think the only way to prevent it is if
we create the snapshot synchronously. Note this could also have occurred
before these changes.

Change-Id: I745d94f5417e17627c1c4d53be8d6fdf01587d35
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoMerge "Bug 2948: Store DataPersistenceProvider in RaftActorContext"
Moiz Raja [Mon, 13 Apr 2015 19:45:01 +0000 (19:45 +0000)]
Merge "Bug 2948: Store DataPersistenceProvider in RaftActorContext"

9 years agoFix unit test failure in ReplicatedImplLogTest 10/18210/1
Tom Pantelis [Mon, 13 Apr 2015 18:14:17 +0000 (14:14 -0400)]
Fix unit test failure in ReplicatedImplLogTest

All verify builds are faling.

Change-Id: Ie92f47dab8eed13284a48c51bb52f3516cfb68a1
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoMerge "Stop swallowing exceptions in XmlElement optional methods."
Tony Tkacik [Mon, 13 Apr 2015 09:11:40 +0000 (09:11 +0000)]
Merge "Stop swallowing exceptions in XmlElement optional methods."

9 years agoMerge "Remove isCloseMsg check for each rpc"
Tony Tkacik [Mon, 13 Apr 2015 07:46:46 +0000 (07:46 +0000)]
Merge "Remove isCloseMsg check for each rpc"

9 years agoMerge "Add LeadershipChangeCount to ShardStats"
Moiz Raja [Sat, 11 Apr 2015 01:13:56 +0000 (01:13 +0000)]
Merge "Add LeadershipChangeCount to ShardStats"

9 years agoMerge "Add new DeleteEntries class wih long "fromIndex" field"
Moiz Raja [Sat, 11 Apr 2015 01:09:47 +0000 (01:09 +0000)]
Merge "Add new DeleteEntries class wih long "fromIndex" field"

9 years agoMerge "Add unit test for ElectionTermImpl"
Moiz Raja [Sat, 11 Apr 2015 01:06:11 +0000 (01:06 +0000)]
Merge "Add unit test for ElectionTermImpl"

9 years agoBug 2948: Store DataPersistenceProvider in RaftActorContext 04/17804/5
Tom Pantelis [Sat, 4 Apr 2015 03:27:51 +0000 (23:27 -0400)]
Bug 2948: Store DataPersistenceProvider in RaftActorContext

This will make the DataPersistenceProvider accessible to callers that
don't have access to the RaftActor. In particular, the SnapshotManager
will need access from the capture method (subsequent patch). The
DataPersistenceProvider can't be passed to capture b/c it is also
called from AbstractLeader which doesn't have access to the
DataPersistenceProvider.

With thus change we no longer have to pass the DataPersistenceProvider to
the persist and commit methods either.

Change-Id: I187901476f2728e4b7f72238e72006c95c188b55
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoBug 2948: Add getLastSequenceNumber method to DataPersistenceProvider 95/17795/3
Tom Pantelis [Sat, 4 Apr 2015 02:01:40 +0000 (22:01 -0400)]
Bug 2948: Add getLastSequenceNumber method to DataPersistenceProvider

New method that returns the last sequence number from akka's persisted
journal. This will be used in a subsequent patch.

Change-Id: Ie2b77358c57eb3e30fea7af317f277d7e660125e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAdd LeadershipChangeCount to ShardStats 81/17981/2
Tom Pantelis [Wed, 8 Apr 2015 18:09:46 +0000 (14:09 -0400)]
Add LeadershipChangeCount to ShardStats

It's useful to see how many shard leadership changes have occurred so I
added a LeadershipChangeCount stat to the ShardStats mbean. This helps
to determine if spurious leadership changes are occurring. I also added
LastLeadershipChangeTime.

Change-Id: I33ddbcd96d6fa93fbfa9887393a2f5a40027d9f3
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAdd new DeleteEntries class wih long "fromIndex" field 99/17399/3
Tom Pantelis [Sun, 29 Mar 2015 12:57:40 +0000 (08:57 -0400)]
Add new DeleteEntries class wih long "fromIndex" field

Added a new DeleteEntries message class that defines the fromIndex field
as a long. The previous DeleteEntries class (inner class of RaftActor)
defined it as an int which could cause rollover. The previous DeleteEntries
must be kept for the time being for backwards compatibility as instances
are persisted.

Change-Id: I774128d9a1af2410a23d2739c37484a508c8a80f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAdd unit test for ElectionTermImpl 97/17397/2
Tom Pantelis [Sun, 29 Mar 2015 12:23:38 +0000 (08:23 -0400)]
Add unit test for ElectionTermImpl

Added a unit test class ElectionTermImplTest and removed the equivalent
test case from RaftActorTest.

Change-Id: I1c3f0e59784422777d742ade4c01e1e18914a213
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAdd unit tests for ReplicatedLogImpl 52/17352/2
Tom Pantelis [Sun, 29 Mar 2015 04:40:09 +0000 (00:40 -0400)]
Add unit tests for ReplicatedLogImpl

Some test cases in RaftActorTest directly test the ReplicatedLogImpl so
they were moved to a new specific test class ReplicatedLogImplTest as
they donlt need the overhead of creating a RaftActor.

Also added more tests and increased coverage in
AbstractReplicatedLogImplTest.

Change-Id: I14e65620d1c8bc89bab055488aed89837ff3f4e7
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAdd unit tests for RaftActorSnapshotMessageSupport 23/17323/2
Tom Pantelis [Sun, 29 Mar 2015 00:51:05 +0000 (20:51 -0400)]
Add unit tests for RaftActorSnapshotMessageSupport

Change-Id: Ic0f5be5c9741f62bae572953d89ac8800ee371af
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoAdd unit tests for RaftActorRecoverySupport 12/17312/6
Tom Pantelis [Sat, 28 Mar 2015 15:27:06 +0000 (11:27 -0400)]
Add unit tests for RaftActorRecoverySupport

Also removed redundant recovery tests from RaftActorTest and added a
test that verifies the RaftActor forwards all recovery messages to the
RaftActorRecoverySupport.

I also refactored MockRactorActor and RaftActorTestKit to their own
files to reduce the size of RaftActorTest.

Change-Id: I75d0a1cfe0d0b168e488ce5cecda29dae4fe4321
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
9 years agoMerge "CDS: Split out TransactionFutureCallback"
Moiz Raja [Fri, 10 Apr 2015 16:13:01 +0000 (16:13 +0000)]
Merge "CDS: Split out TransactionFutureCallback"

9 years agoMerge "Remove deprecation suppression"
Moiz Raja [Fri, 10 Apr 2015 16:12:02 +0000 (16:12 +0000)]
Merge "Remove deprecation suppression"

9 years agoMerge "Add generic arguments"
Moiz Raja [Fri, 10 Apr 2015 16:08:56 +0000 (16:08 +0000)]
Merge "Add generic arguments"

9 years agoMerge "Update lispflowmapping options in custom.properties"
Moiz Raja [Fri, 10 Apr 2015 15:29:20 +0000 (15:29 +0000)]
Merge "Update lispflowmapping options in custom.properties"

9 years agoMerge "Fixes Bug 2935"
Moiz Raja [Fri, 10 Apr 2015 15:28:23 +0000 (15:28 +0000)]
Merge "Fixes Bug 2935"