controller.git
6 years agoUse try-with-resources 82/57082/3
Stephen Kitt [Mon, 15 May 2017 15:56:02 +0000 (17:56 +0200)]
Use try-with-resources

This automatically-generated patch replaces explicit Closeable
handling with try-with-resources.

Change-Id: Ib707d30dd9730fed5dacefa60d7f61c9010e2909
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoFix typo in README.OPENDAYLIGHT 45/51545/2
lijingjing [Wed, 8 Feb 2017 06:09:39 +0000 (14:09 +0800)]
Fix typo in README.OPENDAYLIGHT

Change-Id: Icd88e11fab2e082d24448a2f1443e8fe51a2a284
Signed-off-by: lijingjing <li.jingjing3@zte.com.cn>
6 years agoStringBuffer cleanup 63/57063/4
Stephen Kitt [Mon, 15 May 2017 13:15:08 +0000 (15:15 +0200)]
StringBuffer cleanup

This patch cleans up StringBuffer use, mostly replacing StringBuffer
with StringBuilder or plain String concatenation for short sequences
(or constants).

* HexEncode: additionally, avoid using a separate return variable,
  drop the useless ":" handling in bytesToHexString(), and add the
  test class from l2switch.
* HardcodedModuleFactoriesResolver: rework the conflicting module
  handling.

Change-Id: Id76e91bba9ce40bd8ed5947c2d40e3a7baf0a949
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-distributed-datastore: use lambdas 85/57185/2
Stephen Kitt [Tue, 16 May 2017 15:51:25 +0000 (17:51 +0200)]
sal-distributed-datastore: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Ib397cbe0e0179f2f47ef10f13301b604dc6db88b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-binding-it: use lambdas 80/57180/3
Stephen Kitt [Tue, 16 May 2017 15:50:58 +0000 (17:50 +0200)]
sal-binding-it: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I714b8b5499f6fe5d6f2b2172b59bfba10678bae4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-binding-broker: use lambdas 78/57178/2
Stephen Kitt [Tue, 16 May 2017 15:50:43 +0000 (17:50 +0200)]
sal-binding-broker: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I17f1fd2a8964cec80d35888f437ea098caa9430a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoprotocol-framework: use lambdas 73/57173/2
Stephen Kitt [Tue, 16 May 2017 15:47:17 +0000 (17:47 +0200)]
protocol-framework: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Ife557068a519c0b2822b9ee5dc4b5150373e0cf8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBUG-8402: fix transmit accounting 16/57216/2
Robert Varga [Tue, 16 May 2017 14:49:42 +0000 (16:49 +0200)]
BUG-8402: fix transmit accounting

CSIT has shown that during burst activity and leader movement
we can lose track of messages and the requests can arrive misordered.

As it turns out TransmitQueue.complete() transmit-on-response code
path fails to properly move the request to the in-flight queue.

Furthermore, opportunistic sending TransmitQueue.enqueue() could cause
message reordering if for some reason we have pending requests and
available transmit slot.

Fix this sharing the codepaths and making the TransmitQueue.enqueue()
check pending queue emptiness.

Change-Id: I2daf3d8b198e83c6f50f4a2f43b9e4c3cc091187
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoLower debugging in sal-clustering-commons 41/57141/2
Robert Varga [Tue, 16 May 2017 11:54:24 +0000 (13:54 +0200)]
Lower debugging in sal-clustering-commons

Since this component is under controller.cluster.datastore,
it floods logs with serialization details when we really just
want to understand what the data store is doing. Lower the logs
to TRACE.

Change-Id: Ib9a4735bc439a726452fb98fb5f79d2b7dea2047
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoChange to binding-parent in toaster-provider pom 58/57058/4
Tom Pantelis [Mon, 15 May 2017 12:22:18 +0000 (08:22 -0400)]
Change to binding-parent in toaster-provider pom

It no longer uses the CSS so no need for config-parent.

Change-Id: I79c1c5693da08a5bbf14b7145fd73c51f4ef5be7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoconfig-persister-directory-xml: use lambdas 67/57167/2
Stephen Kitt [Tue, 16 May 2017 15:48:35 +0000 (17:48 +0200)]
config-persister-directory-xml: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I007db062e0b4cabcf56ddbe31039a548e6426017
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-feature4-adapter: use lambdas 69/57169/2
Stephen Kitt [Tue, 16 May 2017 15:48:43 +0000 (17:48 +0200)]
config-persister-feature4-adapter: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I0bf3614763eadd55e40753a02b121c103a400228
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-feature-adapter: use lambdas 68/57168/2
Stephen Kitt [Tue, 16 May 2017 15:48:50 +0000 (17:48 +0200)]
config-persister-feature-adapter: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Ie1c0dda47a741196de89c95cec49fff572904153
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-akka-raft: use lambdas 76/57176/2
Stephen Kitt [Tue, 16 May 2017 15:49:25 +0000 (17:49 +0200)]
sal-akka-raft: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I1c48105a90efa73c1cb7ae2fba9111f74951fe11
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agofilter-valve: use lambdas 72/57172/2
Stephen Kitt [Tue, 16 May 2017 15:47:09 +0000 (17:47 +0200)]
filter-valve: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I1d754b40d7a0b5b75e8069522f4d5278f08938cd
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-clustering-commons: use lambdas 82/57182/2
Stephen Kitt [Tue, 16 May 2017 15:51:11 +0000 (17:51 +0200)]
sal-clustering-commons: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I2a4a800267cd00e9564dfa8b3af069fc14542f61
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-common-impl: use lambdas 84/57184/2
Stephen Kitt [Tue, 16 May 2017 15:51:21 +0000 (17:51 +0200)]
sal-common-impl: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Ideb92bfb1504831895558607a7591eb8c00bc570
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoblueprint: use lambdas 63/57163/2
Stephen Kitt [Tue, 16 May 2017 15:46:54 +0000 (17:46 +0200)]
blueprint: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: If4e75a86d29643a06f218892e5cf88f72f71da2a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-util: use lambdas 71/57171/2
Stephen Kitt [Tue, 16 May 2017 15:49:03 +0000 (17:49 +0200)]
config-util: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Iac5970f81ff50b5b9358eecfc1529d8102f1b22e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-cluster-admin-impl: use lambdas 81/57181/2
Stephen Kitt [Tue, 16 May 2017 15:51:03 +0000 (17:51 +0200)]
sal-cluster-admin-impl: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I4efbae3b891eef993bf8692acd3aa979f44d30f5
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-common-api: use lambdas 83/57183/2
Stephen Kitt [Tue, 16 May 2017 15:51:16 +0000 (17:51 +0200)]
sal-common-api: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Id73e97d756b267aa70e8648f41aaa4e40df50fda
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-manager: use lambdas 65/57165/2
Stephen Kitt [Tue, 16 May 2017 15:48:27 +0000 (17:48 +0200)]
config-manager: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I7a6f08ed63c251a5a2097321e17ab734bab0c73c
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoclustering-test-app: use lambdas 74/57174/2
Stephen Kitt [Tue, 16 May 2017 15:51:47 +0000 (17:51 +0200)]
clustering-test-app: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I32a6ac8e58d3f4b2820c3ee52eedb9e108c1a632
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-api: use lambdas 64/57164/2
Stephen Kitt [Tue, 16 May 2017 15:48:01 +0000 (17:48 +0200)]
config-api: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I77f590e1e5b5548cb472268fb469b5bbf7cd268d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agorpcbenchmark: use lambdas 75/57175/2
Stephen Kitt [Tue, 16 May 2017 15:45:54 +0000 (17:45 +0200)]
rpcbenchmark: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: Ib75e49cf502ee5c646525ebaef09697cdf1dcff0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-dom-broker: use lambdas 86/57186/2
Stephen Kitt [Tue, 16 May 2017 15:51:37 +0000 (17:51 +0200)]
sal-dom-broker: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I99d0a505511aa0deaf675ff3c149fdce40bfb552
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agosal-inmemory-datastore: use lambdas 88/57188/2
Stephen Kitt [Tue, 16 May 2017 15:51:42 +0000 (17:51 +0200)]
sal-inmemory-datastore: use lambdas

This series of patches uses lambdas instead of anonymous classes for
functional interfaces when possible. Lambdas are replaced with method
references when appropriate.

Change-Id: I3ed4fecf12d64254a3f3ec701ea22037e52149cc
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoFix a FB warning 48/57048/2
Robert Varga [Mon, 15 May 2017 09:47:22 +0000 (11:47 +0200)]
Fix a FB warning

There is no need to keep the ticker static, just make it a normal
field.

Change-Id: Ibcc623a82f72aad1af4f88c7c5d2181f01e60710
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBUG 8422: Change tx handlers hard timeout 34/57134/2
Tomas Cere [Tue, 16 May 2017 10:40:35 +0000 (12:40 +0200)]
BUG 8422: Change tx handlers hard timeout

This makes write-transactions/produce-transactions return an
RpcError upon reaching 2 minutes of waiting after the last
transaction is submitted in case the transactions arent timed out
from the frontend.

Change-Id: I20abbd02ed14e16d9e9a49f935113c0044e7c6d8
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoBUG 8447: Add shard getRole rpcs 33/57133/2
Tomas Cere [Tue, 16 May 2017 10:30:48 +0000 (12:30 +0200)]
BUG 8447: Add shard getRole rpcs

These are added to get around jolokia which seems
to sometimes take a very long time to produce a response,
so we have a way to find out the current shard role via
talking directly to the ShardManager.

Change-Id: I18b98988fc9fab26513544c129e5063e87affede
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoBUG-8159: apply object lifecycle to metadata 40/57140/2
Robert Varga [Tue, 16 May 2017 11:20:41 +0000 (13:20 +0200)]
BUG-8159: apply object lifecycle to metadata

In leader role ShardDataTree needs to maintain its own view of
the metadata that is present in the journal, otherwise snapshots
do not contain accurate view nor can the shard transition to follower
while retaining correct state.

The initial idea was that this would be maintained in the replication
callbacks, but that is not really feasible, as it would spread the
code to different codepaths with the possibility of missed updates.

This patch centralizes metadata updates in payloadReplicationComplete(),
performing them unconditionally. Callbacks registered with
replicatePayload() are then used only for hooking in further events,
like sending messages to the frontend.

Change-Id: I2b3de068589f03fe988f11138436a4ec225e357e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoAdd explicit init/close methods to OpendaylightToaster 57/57057/3
Tom Pantelis [Mon, 15 May 2017 12:21:34 +0000 (08:21 -0400)]
Add explicit init/close methods to OpendaylightToaster

The blueprint XML specifies the "register" and "unregister" methods
for init/destroy however this bypasses the "close" method. Add
explicit init/close methods and call register/unregister.

I also moved the initialization code that was in setDataBroker to the
new init method. The former is a setter and should have code logic side
effects.

Change-Id: Idf46f76913c4400aaef61ff78ad8f57e3db4c4b9
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBug 8444 - Persistent prefix-based shard cannot load its snapshot 76/57076/4
Jakub Morvay [Mon, 15 May 2017 15:13:53 +0000 (17:13 +0200)]
Bug 8444 - Persistent prefix-based shard cannot load its snapshot

Since the name is URL-encoded, we have to make sure it does not get
double-encoded -- hence we need to make a pass of URL-decoding before
we use the result.

Change-Id: I20fe8702ad7e405a8b68d8bda2f9ce4522f2dfd0
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoprotocol-framework: final parameters 12/56912/2
Stephen Kitt [Thu, 11 May 2017 16:55:38 +0000 (18:55 +0200)]
protocol-framework: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I48aac237ca7730845935e53adbbe2ce314f7c564
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoliblldp: final parameters 11/56911/2
Stephen Kitt [Thu, 11 May 2017 16:54:05 +0000 (18:54 +0200)]
liblldp: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: If4e0f5e379b1c4f00970e862a775db372cc191fe
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agorpcbenchmark: final parameters 07/56907/2
Stephen Kitt [Thu, 11 May 2017 15:28:56 +0000 (17:28 +0200)]
rpcbenchmark: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I47767df42c202d24a513670bab3af57749f4a1d7
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-api: final parameters 13/56913/2
Stephen Kitt [Thu, 11 May 2017 17:11:11 +0000 (19:11 +0200)]
config-api: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: If0dfb559a3d27e6d54af29ad7f3f1796d5d4ffd4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-it-base: final parameters 14/56914/2
Stephen Kitt [Thu, 11 May 2017 17:12:13 +0000 (19:12 +0200)]
config-it-base: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I18d9f65ec8addc7d5ecb7d809260c2d09ee8a4df
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-manager-facade-xml: final parameters 15/56915/3
Stephen Kitt [Fri, 12 May 2017 07:42:45 +0000 (09:42 +0200)]
config-manager-facade-xml: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I957543aa948a5d2473b7b61ffc3de52467f11d76
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-manager: final parameters 25/56925/2
Stephen Kitt [Fri, 12 May 2017 09:54:20 +0000 (11:54 +0200)]
config-manager: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I78de8a8a8f9766a654432e8ba5a0497f06c4438a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-util: final parameters 60/56960/2
Stephen Kitt [Fri, 12 May 2017 15:17:31 +0000 (17:17 +0200)]
config-util: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ic60c96d83aa19cd7e5adeaf9a7422d26713b326f
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-api: final parameters 62/56962/2
Stephen Kitt [Fri, 12 May 2017 11:18:32 +0000 (13:18 +0200)]
config-persister-api: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: If038e69c48e9b817f80286a70db593d73bc62169
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-directory-xml-adapter: final parameters 63/56963/2
Stephen Kitt [Fri, 12 May 2017 11:19:39 +0000 (13:19 +0200)]
config-persister-directory-xml-adapter: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I58d51e9f65ca798f5ec0af0e21a1336edd55749b
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-feature-adapter: final parameters 64/56964/2
Stephen Kitt [Fri, 12 May 2017 12:08:44 +0000 (14:08 +0200)]
config-persister-feature-adapter: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ic198d806782423545323cc00075219fa89d06dd4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-feature4-adapter: final parameters 65/56965/2
Stephen Kitt [Fri, 12 May 2017 11:43:52 +0000 (13:43 +0200)]
config-persister-feature4-adapter: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ic7dbd9e8dac16196d601dfcd2104fb81bb87f667
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-file-xml-adapter: final parameters 66/56966/2
Stephen Kitt [Fri, 12 May 2017 12:12:11 +0000 (14:12 +0200)]
config-persister-file-xml-adapter: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ib4cdd95a3c54341995c1d40d9b9c45310f3153ab
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoconfig-persister-impl: final parameters 67/56967/2
Stephen Kitt [Fri, 12 May 2017 13:13:20 +0000 (15:13 +0200)]
config-persister-impl: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ib950fb9560113b780898767f03c58edfa022c568
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agontfbenchmark: final parameters 05/56905/2
Stephen Kitt [Thu, 11 May 2017 15:26:59 +0000 (17:26 +0200)]
ntfbenchmark: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: Ia56cdba20e943ec0aac924643c564f6d7e691965
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agodsbenchmark: final parameters 04/56904/2
Stephen Kitt [Thu, 11 May 2017 15:25:21 +0000 (17:25 +0200)]
dsbenchmark: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: If18095c558eb8841e509421dc3d460c34272a03a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoshutdown-impl: final parameters 74/56974/2
Stephen Kitt [Fri, 12 May 2017 16:04:17 +0000 (18:04 +0200)]
shutdown-impl: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I2c2aa1163511c2bd2776e1105732df73669328f3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agonetty-timer-config: final parameters 73/56973/2
Stephen Kitt [Fri, 12 May 2017 15:37:49 +0000 (17:37 +0200)]
netty-timer-config: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I71a80cceb92ea77c2880d26ab311dd1c797e502d
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agonetty-threadgroup-config: final parameters 72/56972/2
Stephen Kitt [Fri, 12 May 2017 15:35:03 +0000 (17:35 +0200)]
netty-threadgroup-config: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I9bdd7ff5c44d8625ef539007be6274145190a3c4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agonetty-event-executor-config: final parameters 71/56971/2
Stephen Kitt [Fri, 12 May 2017 15:33:21 +0000 (17:33 +0200)]
netty-event-executor-config: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I53e5803a91a723714f4c9b5a2299c869d81b5a9a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agologback-config: final parameters 70/56970/2
Stephen Kitt [Fri, 12 May 2017 15:30:51 +0000 (17:30 +0200)]
logback-config: final parameters

This automatically-generated patch flags all appropriate parameters as
final (including caught exceptions).

Change-Id: I3570e5fe57776a24c4ab84de8bdf9b0e09cc0a95
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoFix checkstyle/findbugs violations in the toaster sample 07/57007/3
Tom Pantelis [Sun, 14 May 2017 11:34:12 +0000 (07:34 -0400)]
Fix checkstyle/findbugs violations in the toaster sample

Also enable enforcement.

Change-Id: I25a6b036be4735abffd6b6d4e0b8ed9add637a95
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG-8056: place an upper bound on number of transactions processed 85/56985/2
Robert Varga [Fri, 12 May 2017 13:24:07 +0000 (15:24 +0200)]
BUG-8056: place an upper bound on number of transactions processed

When transactions complete their preCommit step immediately we end
up scheduling the next transaction immediately in the call stack,
hence if that completes immediately we end up eating away our stack
until we hit StackOverflowError.

Limit the number of transactions we process as a reaction to a single
message so that stack usage is under control. Should we hit this
limit, schedule a contiuation, which will deal with the rest of
the transactions.

Change-Id: Iad2812c823bd8e91ad45020ac50f6a8626654afb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBUG-8422: Propagate enqueue time 51/56951/4
Robert Varga [Tue, 9 May 2017 21:55:31 +0000 (23:55 +0200)]
BUG-8422: Propagate enqueue time

When we are replaying requests onto a connection we really want
to leave their enqueue times intact, so they time out properly.
This codepath is specific for the replay case, hence we do not
want to incur any waiting, either.

This patch introduces enqueueRequest() which does not wait for
the queue duration and audits code paths so they end up talking
to the right method -- either enqueueRequest() or sendRequest().

Change-Id: Ibf97dcc11e32d9ffa911c78ccf0448d6891a9cac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 17e4759c7561e09786a22210e43b5b32db45149e)

6 years agoDon't use File(In/Out)putStream in FileBackedOutputStream 58/56958/2
Tom Pantelis [Fri, 12 May 2017 15:13:19 +0000 (11:13 -0400)]
Don't use File(In/Out)putStream in FileBackedOutputStream

As per https://www.cloudbees.com/blog/fileinputstream-fileoutputstream-considered-harmful
FileInputStream/FileOutputStream can incur unnecessary GC overhead due to
finalize. Use Files.newInputStream and Files.newOutputStream instead.

Change-Id: Ic4130ba650fef312e82a5039e9e11a573bd9d406
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG-8372: fix AbstractProxyTransaction.replayMessages() 50/56950/2
Robert Varga [Fri, 5 May 2017 12:35:32 +0000 (14:35 +0200)]
BUG-8372: fix AbstractProxyTransaction.replayMessages()

This method made assumptions on whan requests can be present in the
queue -- notably that local requests are never encountered. This is
not true, as local requests can be present here due to being in-flight
when reconnect occurs.

Change-Id: Ia5b6ec442c014329046bf384a0f5ea97666a2c4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3ee40198347cfb53bd0ce12ffd625cff8ed2383b)

6 years agoFix testLeaderAndFollowerEntityOwnersReassignedAfterShutdown failure 47/56847/4
Tom Pantelis [Thu, 11 May 2017 11:32:39 +0000 (07:32 -0400)]
Fix testLeaderAndFollowerEntityOwnersReassignedAfterShutdown failure

14:19:15 Failed tests:
14:19:15   DistributedEntityOwnershipIntegrationTest.testLeaderAndFollowerEntityOwnersReassignedAfterShutdown:439->lambda$testLeaderAndFollowerEntityOwnersReassignedAfterShutdown$1:440 Raft state expected:<[Leader]> but was:<[Candidate]>

After the leader is shut down, member-2 is supposed to be elected leader but,
in this case, it didn't get the vote from member-5 b/c member-2 had not yet
received the MemberUp for member-5 and thus did not have its peer actor address.
So I made changes to ensure member data stores are ready and members are up.

I also saw a failure where member-3 or member5 didn't grant the vote for member-2
b/c it's last log index was greater. This can happen is member-2 didn't was a bit
behind when the leader was shut down. So I changes it to obtain the leader's last
index and verify the remaining follower's last log index is up-to-date.

Change-Id: Ib5ad2e135bb3809e1c62a432a029a5a56109190d
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG 8318: Add a separate dispatcher for cluster actors 38/56938/2
Tomas Cere [Fri, 12 May 2017 09:59:55 +0000 (11:59 +0200)]
BUG 8318: Add a separate dispatcher for cluster actors

When the system is under load it seems like there can
be a missed heartbeat leading to false positives for unreachable
nodes. Run the actors responsible for heartbeats on a separate
dispatcher to avoid this.

Change-Id: Ib4f4225bf69e99d93e3c7010d6fbe1163b96a5a2
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agofix config file for mdsal-trace and filtering mechanism 60/56860/4
Josh [Thu, 11 May 2017 13:43:07 +0000 (16:43 +0300)]
fix config file for mdsal-trace and filtering mechanism

Initially missed this but this patch fixes the initial config
xml file. Also, this code contains a fix for an issue with
filtering paths that CODEC could not handle and were reconstructed.

Change-Id: I34da4ce9e78c075439b0047407c75aa0b86feb16
Signed-off-by: Josh <jhershbe@redhat.com>
6 years agoBug 8424: Don't output data tree and tree candidates wih debug 80/56880/5
Tom Pantelis [Thu, 11 May 2017 16:31:27 +0000 (12:31 -0400)]
Bug 8424: Don't output data tree and tree candidates wih debug

Data trees and tree candidates can get quite large and fill up the
log files when debug is on and, worst case, cause OOM errors. For
debug logging, only print the whole tree/candidate with trace logging.
In cases where an Optional data tree is outputted via toString, only
output if the data tree is present or not.

Change-Id: I6cb5f9a5da9e3cc3218c83bb103b673db0fb1d80
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoRemove <prerequisites> from pom.xml to avoid WARNING 92/56892/2
David Suarez [Thu, 11 May 2017 22:17:07 +0000 (00:17 +0200)]
Remove <prerequisites> from pom.xml to avoid WARNING

[WARNING] The project ... uses prerequisites which is only intended for
maven-plugin projects but not for non maven-plugin projects. For such
purposes you should use the maven-enforcer-plugin. See
https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

This is already done in odlparent.

Change-Id: If10668be0f69f89a0101e8fe6bf611130772a9e0
Signed-off-by: David Suarez <david.suarez.fuentes@ericsson.com>
6 years agoBUG-8372: add dataTree information 70/56870/1
Robert Varga [Thu, 4 May 2017 15:56:33 +0000 (17:56 +0200)]
BUG-8372: add dataTree information

We are attempting to send a local message to a remote actor,
which seems to be a mixup with data tree presence. Add dataTree
to toString() output so we know which connections resolve to
being local and which to being remote.

Change-Id: If1ed3cfdea24148456a4d310949fb480791c1ffa
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 3f8818fd65f1cac8f4b2ce3b7319255137c74da5)

6 years agomdsaltrace utility for debugging 12/49212/18
Josh [Sun, 11 Dec 2016 08:47:46 +0000 (10:47 +0200)]
mdsaltrace utility for debugging

Moved back to controller per decision from kernel meeting
a few weeks ago.

TracingBroker logs 'write' operations
and listener registrations to the md-sal. It logs the instance
identifier path, the objects themselves, as well as the stack trace of
the call invoking the registration or write operation. It works by
operating as a "bump on the stack" between the application and actual
DataBroker, intercepting write and registration calls and writing to the
log.`

+ karaf4

Change-Id: Ie7d27901429f6e7bcac7ff62e49e4e3115f5915f
Signed-off-by: Josh <jhershbe@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBUG-8392 RpcRegistry has it's buckets populated by unreachable nodes 84/56784/3
Tomas Cere [Wed, 10 May 2017 12:04:37 +0000 (14:04 +0200)]
BUG-8392 RpcRegistry has it's buckets populated by unreachable nodes

In a situation when a member(f.ex member2) is isolated and the rpc registrations
are removed from the node(member1) we can still have our bucket store populated
by buckets from the remaining node(member-3) which might not have received
the memberUnreachable message yet leadig to stale routing of an rpc to
member-2.
This patch adds bucket filtering based on the currently present peers
so that we only accept Buckets that we can see.

Change-Id: I92c1e063f4754aca829bd73df4518f859e1d8497
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoFix timing issue in PartitionedCandidateOnStartupElection*Test 81/56681/4
Tom Pantelis [Mon, 8 May 2017 16:49:51 +0000 (12:49 -0400)]
Fix timing issue in PartitionedCandidateOnStartupElection*Test

If the initial AppendEntries sent by the leader (member 1) to member 3
is delayed enough such that the behavior field in MemberActor is already
set by the test code, the AppendEntries message will be forwarded to the
Candidate behavior and yield incorrect results for the test. To prevent this,
we really shouldn't set and access the behavior field directly but instead
do so via messages to maintain actor encapsulation.

Change-Id: If497583ce648e62e3279e5abff19cb8702943c17
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBug 8385: Fix testMultipleRegistrationsAtOnePrefix failure 22/56722/4
Tom Pantelis [Tue, 9 May 2017 12:29:07 +0000 (08:29 -0400)]
Bug 8385: Fix testMultipleRegistrationsAtOnePrefix failure

The previous patch added a callback on the Future returned by
gracefulStop on shard removal. The timout was set to 3 * election timeout
which is 30 s in production by default. For the tests the election
timeout is 500 ms so the timeout is 1500 ms. However, if the timing is right,
the leader may not be able to transfer leadership on shutdown if the other
member was already shutdown. On shutdown there's a 2 sec wait to hear from
a new leader - this is greater than the 1500 ms shutdown timeout which
leads to test failure. To alleviate this, I made 10 s the minimum for the
shutdown timeout.

Another problem was that, after the stop future failed, the OnComplete
callback for PrefixShardCreated was repeated many times before the
OnComplete callback queued the message to remove the Future from the map.
To alleviate this, I added a CompositeOnComplete containing a list of
deferred OnComplete tasks. This allows the control to remove the entry
from the map before the deferred tasks run.

Change-Id: I899518e6d7e92533d2c4008a978ac772b02863cf
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoFix testTransactionForwardedToLeaderAfterRetry failure 63/56763/2
Tom Pantelis [Wed, 10 May 2017 07:00:09 +0000 (03:00 -0400)]
Fix testTransactionForwardedToLeaderAfterRetry failure

java.util.concurrent.ExecutionException: ReadFailedException{message=Error executeRead ReadData for path /(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:cars?revision=2014-03-13)cars/car, errorList=[RpcError [message=Error executeRead ReadData for path /(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:cars?revision=2014-03-13)cars/car, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, cause=org.opendaylight.controller.md.sal.common.api.data.DataStoreUnavailableException: Shard member-1-shard-cars-testTransactionForwardedToLeaderAfterRetry currently has no leader. Try again later.]]}

The test submits transactions and deposes the current leader so it forwards the
pending transactions to the other member-2 that assumes leadership. However it calls

   Cluster.get(followerSystem).leave(MEMBER_1_ADDRESS);

which may result in an untimely MemberExited message sent to the ShardManager that
clears the peer address, causing the FindPrimary message to fail to find the leader.
I'm not clear why this was call was put in but it's unnecessary and may cause a
failure if the timing is right.

I also saw a failure due to a timeout when forwarding a pending transaction. This is
b/c it takes some time for member-2 to switch to candidate and become leader due to
the checking of current leader availability via the akka cluster on ElectionTimout.
If it takes too long the pending transaction forwarding may time out. To alleviate
this, I forced the swicth to candidate by sending an immediate TimeoutNow message.

Change-Id: I2dd228964779e2b755b1740a518e2c400b5cb88d
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBug 8391 - Close producer in become-prefix-leader rpc implementation 83/56683/5
Jakub Morvay [Mon, 8 May 2017 11:58:57 +0000 (13:58 +0200)]
Bug 8391 - Close producer in become-prefix-leader rpc implementation

MdsalLowLevelTestProvider's become-prefix-leader rpc implementation
creates CDSDataTreeProducer to try to move shard leadership. However,
the producer is not closed after leadership change request. This
prevents any subsequent invocations of become-prefix-leader rpc with
same prefix parameter to be successful. Subtree specified by the prefix
is attached to still opened producer and creation of any new producer
for this subtree fails. Close producer once we don't need it.

Change-Id: I3827e425082c35a43ec18dac1ef0f2dbd19b291f
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoBUG-8372: fix abort message confusion 38/56638/2
Robert Varga [Fri, 5 May 2017 11:46:22 +0000 (13:46 +0200)]
BUG-8372: fix abort message confusion

Immediate transaction aborts need to use the appropriate message,
not 3PC's TransactionAbortRequest.

Change-Id: I9e25e3f20ed62fc520853685af17accef35c1bb4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4036805b31f73c7e7e2b06e84c8da975b2e45263)

6 years agoBug 8342: Add info logging to ConfigManagerActivator 69/56469/3
Tom Pantelis [Tue, 2 May 2017 19:16:44 +0000 (15:16 -0400)]
Bug 8342: Add info logging to ConfigManagerActivator

Change-Id: I7b01961910dd2ba7ed9a421ee52e0aec29c68ade
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit 1635f00212f8a583c6160cc3ff153e2c62af5092)

6 years agoBug 8385 - @Ignore testMultipleRegistrationsAtOnePrefix 58/56658/2
Jakub Morvay [Mon, 8 May 2017 08:01:29 +0000 (10:01 +0200)]
Bug 8385 - @Ignore testMultipleRegistrationsAtOnePrefix

DistributedShardedDOMDataTreeRemotingTest.testMultipleRegistrationsAtOnePrefix
is failing intermittently - set it to ignore for now.

Change-Id: I3e8aec2bfbe97559525051805170203574472aab
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoBUG-8372: improve forward/replay naming 37/56637/1
Robert Varga [Fri, 5 May 2017 10:04:12 +0000 (12:04 +0200)]
BUG-8372: improve forward/replay naming

There is a bit of confusion between 'replay' and 'forward' methods.
They serve two distinct purposes:
- 'replay' happens during reconnect, i.e. for requests that have
           already entered the connection queue and have paid
           the delay cost, so they should not pay it again.
- 'forward' happens after reconnect for requests that have raced
            with the reconnect process, i.e. they need to hop from
            the old connection to the new one. These need to enter
            the queue and pay the delay cost.

This patch cleans the codepaths up to use consistent naming, making
it clearer that the problem we are seeing is in the 'replay' path.

Change-Id: Id854e09a0308f8d0a9144d59f41e31950cd58665
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit cc21df8ade11f41843dc558e8fc93d5be92ed151)

6 years agoMake the last submit timeout after 30 seconds 92/56592/3
Tomas Cere [Fri, 5 May 2017 10:11:17 +0000 (12:11 +0200)]
Make the last submit timeout after 30 seconds

The low level test was waiting indefinetly for submits
to finish, change this to block and timeout after one minute
in case there's an unrecoverable failure on the backend which
doesnt propagate to the frontend.

Change-Id: I3df2465b56c701c88341ab6cc7fa37a015f1c893
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoMove initial list creation to create-prefix-shard. 42/56542/4
Tomas Cere [Wed, 3 May 2017 13:21:00 +0000 (15:21 +0200)]
Move initial list creation to create-prefix-shard.

This move the initial list population of produce-transactions
to create-prefix-shard rpc with 3 hardcoded prefixes(prefix-1,prefix-2,prefix-3)
so that csit suites can populate the id-int list just once when the shard is created
and produce-transactions can now run parallely on multiple entries from
multiple nodes.

Change-Id: If70990c0e217cd68027ae960a7545c69acf52cdb
Signed-off-by: Tomas Cere <tcere@cisco.com>
(cherry picked from commit 74175c48bb2b3ee786108bdda8e665484080b7f5)

6 years agoBug 8380: Fix unhandled messages in ShardManager 15/56615/2
Tom Pantelis [Fri, 5 May 2017 18:21:50 +0000 (14:21 -0400)]
Bug 8380: Fix unhandled messages in ShardManager

Added trace logging for RegisterRoleChangeListenerReply and other
MemberEvent (ie MemberJoined, MemberLeft).

The DeleteMessagesSuccess message was the result of deleting legacy
journal messages (SchemaContextModules) that were kept for backwards
compatibility with Helium. I removed the associated code and the
deprecated ShardManager class that was kept for the SchemaContextModules
inner class.

Also added logging for DeleteSnapshotsFailure and DeleteSnapshotsSuccess.

Change-Id: I145ea815b191f1e167e73029df348c7d15732c4f
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBug 8385: Fix testMultipleRegistrationsAtOnePrefix failures 90/56590/4
Tom Pantelis [Fri, 5 May 2017 10:41:59 +0000 (06:41 -0400)]
Bug 8385: Fix testMultipleRegistrationsAtOnePrefix failures

The test quickly creates/removes the prefix shard in iterations which
can result in an InvalidActorNameException if the shard actor from the prior
iteration hadn't been destroyed yet. To alleviate this I modified the
removal in the ShardManager to utilize Patterns.gracefulStop to store the
Future and block a subsequent create until the Future completes.

Change-Id: Ica98de3cc17c2d87195840bdf052d81ed3b9dd10
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoPre-construct YangModuleInfo service name 87/56487/3
Robert Varga [Wed, 3 May 2017 15:49:10 +0000 (17:49 +0200)]
Pre-construct YangModuleInfo service name

This cleans up ModuleInfoBundleTracker instantiation as well
as making a tiny bit faster when looking up services.

Change-Id: I2bdce2fdca9cefd56192b04f74ed7c594187d425
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix DistributesShardedDOMDataTree.ProxyProducer's getShardAccess 79/56579/1
Jakub Morvay [Tue, 2 May 2017 16:54:52 +0000 (18:54 +0200)]
Fix DistributesShardedDOMDataTree.ProxyProducer's getShardAccess

DistributesShardedDOMDataTree.ProxyProducer's getShardAccess works only
for subtrees that are rooted at some registered prefix based shard.
Moreover subtree has to be one of the subtrees specified in
DistributedShardedDOMDatatTree's createProducer method.

This is way more strict than what is required by CDSDataTreeProducer's
API. Pass ProxyProducer's implementation current shard layout, so
producer can lookup corresponding shard for specified subtree in
getShardAccess method. One-to-one mapping between shards and subtrees
is no longer required.

Change-Id: I765567d34c803a85b4be8a6e10fd81b6f64a1610
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoFix logger formatting strings 37/56537/1
Robert Varga [Thu, 4 May 2017 15:51:43 +0000 (17:51 +0200)]
Fix logger formatting strings

Fix %s/{} mixups.

Change-Id: I916996e17839a61802a83ddff31d162ac662f934
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBug 8328 - Create prefix shards with correct peers 98/56498/2
Jakub Morvay [Thu, 27 Apr 2017 15:21:42 +0000 (17:21 +0200)]
Bug 8328 - Create prefix shards with correct peers

Change-Id: I068b38bb275d23d27559aec3f336a6b9081fb732
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoBug 8336 - Fix NPE in DistributedShardedDOMDataTree's ProxyProducer 99/56499/1
Jakub Morvay [Tue, 2 May 2017 08:32:20 +0000 (10:32 +0200)]
Bug 8336 - Fix NPE in DistributedShardedDOMDataTree's ProxyProducer

Change-Id: If0060e6e2696674bc5418d2f2a80ad0d01327e29
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
6 years agoFix Eclipse warnings in config-manager 70/56470/2
Robert Varga [Wed, 3 May 2017 13:34:13 +0000 (15:34 +0200)]
Fix Eclipse warnings in config-manager

Change-Id: I0ed9bc52d4cf4e5ee7a4da8bd53355191326cba6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBUG 8301: Convert queue to a local variable 72/56472/1
Tomas Cere [Wed, 3 May 2017 11:12:31 +0000 (13:12 +0200)]
BUG 8301: Convert queue to a local variable

There's a possibility that this might race and an
actor can have it's queue overwritten by another thread, so convert
this to a local variable.

Change-Id: Ic84922c6d109d8361a48debbf971fddd9cee1d3e
Signed-off-by: Tomas Cere <tcere@cisco.com>
6 years agoBUG-8342: force config-manager startup 67/56467/2
Robert Varga [Wed, 3 May 2017 08:51:32 +0000 (10:51 +0200)]
BUG-8342: force config-manager startup

config-manager needs to be pretty much the first thing that comes
up due to historic reasons. Assign it a low start level so it
activates before the blueprint extension.

Change-Id: I2d0a3706843409e8a22f9064f27e47cc0df46c95
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 21870dc0696930b3be36c689bc7ae0929c5b9878)

6 years agoDowngrade most info messages in benchmarks 96/56396/1
Vratko Polak [Wed, 26 Apr 2017 18:37:43 +0000 (20:37 +0200)]
Downgrade most info messages in benchmarks

They create spam during CSIT,
making real errors less noticable in log.

Change-Id: Icf00389526919751e88189ffef1be70e16e806e8
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
(cherry picked from commit 3f26179cf9ed4ebd4b680805d2d93f904ea60806)

6 years agoRefactor Register*ListenerReply classes 76/55176/2
Tom Pantelis [Tue, 18 Apr 2017 06:32:37 +0000 (02:32 -0400)]
Refactor Register*ListenerReply classes

The listener-type specific RegisterDataTreeChangeListenerReply and
RegisterChangeListenerReply classes are identical. Simplify by
replacing them with a general RegisterDataTreeNotificationListenerReply.
This also simplifies AbstractDataListenerSupport by eliminating the
abstract newRegistrationReplyMessage method.

Change-Id: I97f6cf366ae6ff858ff258ebb8479468b144c193
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG-8327: deprecate sal.core.api.model.SchemaService 65/56265/4
Robert Varga [Fri, 28 Apr 2017 15:03:32 +0000 (17:03 +0200)]
BUG-8327: deprecate sal.core.api.model.SchemaService

This interface is deprecated in favor of the DOMSchemaService
for the MD-SAL project.

Change-Id: Icff2cced791bc9fbf5bfadbe2f1cf2b949ff2d58
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBUG-8327: GlobalBundleScanningSchemaServiceImpl should be a proxy 64/56264/5
Robert Varga [Fri, 28 Apr 2017 14:56:48 +0000 (16:56 +0200)]
BUG-8327: GlobalBundleScanningSchemaServiceImpl should be a proxy

We are currently running to separate services which assemble
the GlobalSchemaContext, which hurts our startup performance and
leads to wasted memory. This is an artefact of the mdsal split,
hence we should be getting the service from the MD-SAL and
just proxy to old interfaces.

This lowers the startup time for

feature:install odl-restconf odl-bgpcep-bgp
    odl-bgpcep-data-change-counter odl-netconf-topology

from 86s down to 67s (22%). Final retained heap size is also
lowered from 217MiB to 181MiB (16%)

Change-Id: I549e9512538bd83d86cfd2164d03e34bc9130c1e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoImprove test logging in DistributedEntityOwnershipIntegrationTest 95/56295/3
Tom Pantelis [Sun, 30 Apr 2017 02:44:26 +0000 (22:44 -0400)]
Improve test logging in DistributedEntityOwnershipIntegrationTest

Some of the tests in DistributedEntityOwnershipIntegrationTest set the
datastore type to "test" which isn't helpful in identifying the output
in jenkins log archives. Use the name of the test method instead as is
done with other tests.

Change-Id: I25e40df5139a4d9f8c46d03c0f2c9c8a52fd15ee
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBug 8303: BP odl:clustered-app-config initial/*-config.xml testability 27/56027/4
Michael Vorburger [Tue, 25 Apr 2017 22:32:15 +0000 (00:32 +0200)]
Bug 8303: BP odl:clustered-app-config initial/*-config.xml testability

DataStoreAppConfigDefaultXMLReaderTest illustrates usage.

Change-Id: I342fca4583c90802238e63262871e33b4b713438
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoBUG-8309: Add message identity information 56/56156/2
Robert Varga [Wed, 26 Apr 2017 08:46:15 +0000 (10:46 +0200)]
BUG-8309: Add message identity information

We have encountered an attempt to serialize a local request across
a remote connection. Since this is hit by the akka serializer, we
have lost the identity of the call site and of the message, because
all akka is seeing is the Envelope and the exception's stack trace,
which only indicates class hierarchy up to and including
AbstractLocalTransactionRequest.

This patch enriches the exception message so we know what the actual
request was, hopefully pinpointing the offending call site. Since
the problem revolves around the reconnect process, bump critical
transitions to info instead of debug.

Change-Id: I6d6d6e702d4b5baff7b707242583e923708e7637
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4ec6c11c03ae92e11a7cea29795e4b7f5547f64e)

6 years agoBug 8337: Ignore testMultipleShardLevels 87/56287/1
Tom Pantelis [Sat, 29 Apr 2017 01:43:34 +0000 (21:43 -0400)]
Bug 8337: Ignore testMultipleShardLevels

DistributedShardedDOMDataTreeTest.testMultipleShardLevels is
failing intermittently - set it to ignore for now.

Change-Id: Ib7f86166fd85cd54e6ec8cac106c993e9407ffea
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit 8b4e6a8e938513006ad5f1be786767b103210e78)

6 years agoAdd more debug logging for DTCL registration/notification code paths 54/56154/3
Tom Pantelis [Thu, 27 Apr 2017 11:23:34 +0000 (07:23 -0400)]
Add more debug logging for DTCL registration/notification code paths

Added logging so the listener instance and actor can be traced
end-to-end from FE registration to the BE publisher actor.

Also added log context to some classes to identify which shard it
belongs to.

Change-Id: I3e6dd92e7632139372407abf94a160096aa7750e
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoBUG-7927: stop scanning bundles on framework stop 82/56182/4
Robert Varga [Thu, 27 Apr 2017 15:36:37 +0000 (17:36 +0200)]
BUG-7927: stop scanning bundles on framework stop

Monitor framework bundle for STOPPING event and when it triggers
flag us as stopping: all bundles are about to shut down, so there
is no point in trying to update the schema context anymore.

Change-Id: I1a55169fce1705c19a139063cf632674fc256701
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoImprove logging around transaction lifecycle 15/56015/3
Robert Varga [Tue, 25 Apr 2017 08:39:21 +0000 (10:39 +0200)]
Improve logging around transaction lifecycle

Testing has shown that we have a gap in request handling and we
have a lot of unclosed transactions. Add logging of code paths
which trigger unsupported request.

Change-Id: I013ba8a141d5a1a9e311a8bca7842ac77064d277
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 63d615831603b7a0a11b173f9d9316641e880844)

6 years agoBug 8301: Fix some issues with testProducerRegistrations 50/56150/2
Tom Pantelis [Thu, 27 Apr 2017 10:45:11 +0000 (06:45 -0400)]
Bug 8301: Fix some issues with testProducerRegistrations

The LogicalDatastoreType.CONFIGURATION type was being used for both data
stores - modified the IntegrationTestKit to set the logicalStoreType
appropriately.

Fixed a synchronization issue in DistributedShardedDOMDataTree#lookupShardFrontend
where it accessed shards unprotected.

Change-Id: I628add86667e4a812f8e7516bac59f9b66fe4033
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoFix intermittent failure in testLeadershipTransferOnShutdown 16/56016/3
Tom Pantelis [Tue, 25 Apr 2017 17:26:27 +0000 (13:26 -0400)]
Fix intermittent failure in testLeadershipTransferOnShutdown

10:03:06 java.util.concurrent.ExecutionException: ReadFailedException{message=Error executeRead ReadData for path /(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:cars?revision=2014-03-13)cars/car, errorList=[RpcError [message=Error executeRead ReadData for path /(urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom:store:test:cars?revision=2014-03-13)cars/car, severity=ERROR, errorType=APPLICATION, tag=operation-failed, applicationTag=null, info=null, cause=org.opendaylight.controller.md.sal.common.api.data.DataStoreUnavailableException: Shard member-2-shard-cars-testLeadershipTransferOnShutdown currently has no leader. Try again later.]]}
10:03:06  at org.opendaylight.yangtools.util.concurrent.MappingCheckedFuture.wrapInExecutionException(MappingCheckedFuture.java:64)
10:03:06  at org.opendaylight.yangtools.util.concurrent.MappingCheckedFuture.get(MappingCheckedFuture.java:92)
10:03:06  at org.opendaylight.controller.cluster.datastore.DistributedDataStoreRemotingIntegrationTest.verifyCars(DistributedDataStoreRemotingIntegrationTest.java:215)
10:03:06  at org.opendaylight.controller.cluster.datastore.DistributedDataStoreRemotingIntegrationTest.testLeadershipTransferOnShutdown(DistributedDataStoreRemotingIntegrationTest.java:928)

From the logs it seems member-2 hadn't gotten MemberUp for member-3 after the
leader transfer and by the time it tried to read. I added calls to wait for members
to be up. After the change it ran 333 times w/o failure.

Change-Id: Ifbbf304230292f69429d3086867679effb8db01c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>