3 years agoFix checkstyle issues in module sal-dom-broker 77/64277/4
David Suarez [Tue, 17 Oct 2017 09:56:07 +0000 (11:56 +0200)]
Fix checkstyle issues in module sal-dom-broker

It includes enforcement in pom.xml

Change-Id: I9c696f0d174cc90433a7b65f17e933fbc1390bcb
Signed-off-by: David Suarez <>
3 years agoGuards iteration against concurrent modification 64/65464/2
Jie Han [Mon, 13 Nov 2017 03:26:39 +0000 (11:26 +0800)]
Guards iteration against concurrent modification

- fix or it would throw a ConcurrentModificationException.
Change-Id: I39664b2238ef62d2add96cb76ac8c2113cfc2265
Signed-off-by: Jie Han <>
3 years agoFix io.dropwizard.metrics version 86/65386/1
Michael Vorburger [Thu, 9 Nov 2017 18:32:59 +0000 (19:32 +0100)]
Fix io.dropwizard.metrics version

so that it can be removed from odlparent dependencyManagement
in I0ce0e4b7ad54e171c061e1bb91d568b25e9d1145


also minor clean up and remove the io.dropwizard.metrics
dependency in sal-distributed-datastore, because that
actually inherits it from sal-clustering-commons anyway.

Change-Id: I74f41742fbcb18bbb9b798b9a4fe73ce5add87eb
Signed-off-by: Michael Vorburger <>
3 years agomdsal-trace: log whether listeners are ClusteredDOMDataTreeChangeListener 72/65172/1
Josh [Mon, 6 Nov 2017 14:47:11 +0000 (16:47 +0200)]
mdsal-trace: log whether listeners are ClusteredDOMDataTreeChangeListener

Change-Id: Ia7f5d7e722fa0b5400fc10ff72dd1eb0e575f2d0
Signed-off-by: Josh <>
3 years agoFix karaf restart instruction 71/64971/1
Robert Varga [Tue, 31 Oct 2017 16:56:13 +0000 (17:56 +0100)]
Fix karaf restart instruction

We accidentally dropped a 0 in getBundle() -- we need to stop the system
bundle, not the CDS bundle.

Change-Id: Idbaa59aa39c2863ec76859b2ffa448b50890fd55
Signed-off-by: Robert Varga <>
3 years agoMDSAL-107: Fix pre-existing data notification for wildcarded DTCL 42/64742/3
Valentin Mayamsin [Fri, 16 Oct 2015 21:38:02 +0000 (14:38 -0700)]
MDSAL-107: Fix pre-existing data notification for wildcarded DTCL

This issue was fixed in CDS a while but should also be fixed for the
in-memory DOM data store.

Change-Id: Idb69ebed32b5b7a7e10bc373e2272c22b0198567
Signed-off-by: Tom Pantelis <>
3 years agoBug 9288 - DistributedDataStoreFactory in sal-distributed-datastore 62/64662/10
Jakub Toth [Tue, 24 Oct 2017 13:54:46 +0000 (15:54 +0200)]
Bug 9288 - DistributedDataStoreFactory in sal-distributed-datastore
uses hardcoded dependencies on OSGI/karaf

  * remove config admin overlay in java
    * add managed-properties to specifc bean in blueprint
      for listening on config admin change in blueprint context
      and invkoking update method
  * fix tests

Change-Id: I5bc33348bdb7f3317d02d956796d947859246e61
Signed-off-by: Jakub Toth <>
3 years agoBug 9285 - EntityOwnerSelectionStrategyConfigReader in 07/64607/14
Jakub Toth [Wed, 25 Oct 2017 17:27:07 +0000 (19:27 +0200)]
Bug 9285 - EntityOwnerSelectionStrategyConfigReader in
sal-distributed-datastore uses hardcoded dependencies on OSGI/karaf

 *removed hardcoded dependecies on OSGi
  *removed EntityOwnerSelectionStrategyConfigReader + test
 *set up properties for shards in DistributedEntityOwnershipService
  via blueprint
 *read config from properties via reflection from object type
 *allowed direct set up properties

Change-Id: Iff429c85e13bf6685e6d515ae044af36b19301bc
Signed-off-by: Jakub Toth <>
3 years agoBUG-9028: log stack traces on lastApplied changes 50/64150/4
Robert Varga [Tue, 22 Aug 2017 18:29:18 +0000 (20:29 +0200)]
BUG-9028: log stack traces on lastApplied changes

This patch improves logging so we can turn up stack traces
if we ever uncounter lastApplied change shifts.

Change-Id: I4391c0580171a0edc9c93cb41aa56b3eb9cbb521
Signed-off-by: Robert Varga <>
3 years agoBug 9283 - BindingToNormalizedNodeCodecFactory in sal-binding-broker 92/64292/8
Jakub Toth [Mon, 16 Oct 2017 07:56:58 +0000 (09:56 +0200)]
Bug 9283 - BindingToNormalizedNodeCodecFactory in sal-binding-broker
use hardcoded dependencies on OSGI/karaf

  * remove hardcoded dependecies on OSGi
    * moved to blueprint

Change-Id: I0b012877bb7dd12131c6268070ea3a87c7d0ded1
Signed-off-by: Jakub Toth <>
3 years agoFix some sonar/checkstyle issues 76/64276/2
David Suarez [Sat, 14 Oct 2017 13:49:21 +0000 (15:49 +0200)]
Fix some sonar/checkstyle issues

- Remove unnecessary boxing
- Utility classes should be final and implement a private constructor
- Remove unnecessary types
- Remove two duplicated entries in pom.xml

Change-Id: I2f4539babf7d4ea6d4550d81b71deb4399dc1dc3
Signed-off-by: David Suarez <>
3 years agoReplace deprecated Futures.addCallback by the newer version 75/64275/1
David Suarez [Sat, 14 Oct 2017 09:08:20 +0000 (11:08 +0200)]
Replace deprecated Futures.addCallback by the newer version

The method addCallback(ListenableFuture<V> future,
FutureCallback<? super V> callback) is deprecated and will be replaced
by a new its new version addCallback(ListenableFuture<V> future,
FutureCallback<? super V> callback, Executor executor) in April 2018.

Some other minor changes fix checkstyle/sonar issues.

Change-Id: Ic6c31424b1dc8d5e4d257a77fb858d6fa47ca814
Signed-off-by: David Suarez <>
3 years agoImport MappingCheckedFuture from mdsal 94/64194/1
Robert Varga [Thu, 12 Oct 2017 09:44:51 +0000 (11:44 +0200)]
Import MappingCheckedFuture from mdsal

yangtools is getting rid of references to CheckedFuture,
mdsal-common-api is the new place for this utility class.

Change-Id: Icaa2242fb29ba5c79a48a682c0f09f310499e322
Signed-off-by: Robert Varga <>
3 years agoFix sonar warnings in sal-distributed-datastore 63/63363/6
Tom Pantelis [Wed, 20 Sep 2017 18:00:31 +0000 (14:00 -0400)]
Fix sonar warnings in sal-distributed-datastore

These come from squid:

- String literals should not be duplicated
- Modifiers should be declared in the correct order
- Lambdas and anonymous classes should not have too many lines
- Nested blocks of code should not be left empty
- Local variables should not shadow class fields
- Exception handlers should preserve the original exception
- Utility classes should not have public constructors
- Overriding methods should do more than simply call the same method in the super class
- Unused private fields should be removed

I fixed quite a few of them. Others we'd have to suppress or modify the sonar
config to be more lenient.

Change-Id: I7ce7b2a05feac9844fd9c37927de82b7b8b68ee5
Signed-off-by: Tom Pantelis <>
3 years agoBUG-9218: package controller inventory model 81/64081/1
Robert Varga [Mon, 9 Oct 2017 17:32:44 +0000 (19:32 +0200)]
BUG-9218: package controller inventory model

Downstreams are pulling in model-inventory artifact because they
do not have a feature where to pull it from. Provide that feature as

Change-Id: I973830ff5b334ea544621f0a8ffc53557439b9c0
Signed-off-by: Robert Varga <>
3 years agoBug 8829: Ignore error when initializing dsbenchmark 17/52317/7
Vratko Polak [Mon, 10 Jul 2017 10:51:18 +0000 (12:51 +0200)]
Bug 8829: Ignore error when initializing dsbenchmark

+ Also fix ParenPad violations.

Change-Id: I6f4902bb8236fc1560e1e38554465aefadb775ee
Signed-off-by: Vratko Polak <>
3 years agoBump controller to use yangtools 1.2.0 54/63754/5
Anil Belur [Thu, 28 Sep 2017 06:43:05 +0000 (16:43 +1000)]
Bump controller to use yangtools 1.2.0

Jira: releng-486
Change-Id: I01e742c10e975385b7681a186fd9873c4e9670b8
Signed-off-by: Anil Belur <>
Signed-off-by: Robert Varga <>
3 years agoBump odlparent 2.0.4 to 2.0.5 34/63634/3
Stephen Kitt [Wed, 27 Sep 2017 13:35:13 +0000 (15:35 +0200)]
Bump odlparent 2.0.4 to 2.0.5

Also moves config/rpc-context.yang to include revision, making
the tests compatible with both 1.2.0 and 2.0.0 version of yangtools.

Change-Id: Ic7eb7d8fd27f5f3e5ae0f0aea9ab642a9b1b6fac
Signed-off-by: Stephen Kitt <>
Signed-off-by: Robert Varga <>
3 years agoRemove explicit default super-constructor calls 20/63620/1
David Suarez [Wed, 27 Sep 2017 13:23:16 +0000 (15:23 +0200)]
Remove explicit default super-constructor calls

The default constructor is called by default (hence its name), no need
to call it explicitly.

Change-Id: I0f4ac3bf4a1d582b7a9d50beeaa1de6d2f107499
Signed-off-by: David Suarez <>
3 years agoTracingBroker: collapse ellipses 29/62829/5
Stephen Kitt [Thu, 7 Sep 2017 11:38:14 +0000 (13:38 +0200)]
TracingBroker: collapse ellipses

This avoids printing multiple "(...)" lines in succession.

(The test is made a little more change-resistant by removing the
expected line number.)

Change-Id: I9ede5d0d15afecb06c61cbe2b2c5a70967616280
Signed-off-by: Stephen Kitt <>
3 years agoForwardingRead[Only]/WriteTransaction implementations 68/63468/2
Michael Vorburger [Fri, 22 Sep 2017 22:27:29 +0000 (00:27 +0200)]
ForwardingRead[Only]/WriteTransaction implementations

this came up during

a bit similar (but otherwise unrelated) to my earlier

Change-Id: If669f94b47bf41f49e54c66c6024aeff9805f8d6
Signed-off-by: Michael Vorburger <>
4 years agoAsyncWriteTransaction JavaDoc re. retries > instead of < 70/63470/1
Michael Vorburger [Sat, 23 Sep 2017 00:46:57 +0000 (02:46 +0200)]
AsyncWriteTransaction JavaDoc re. retries > instead of <

in case of OptimisticLockFailedException, one should do:

   if (tries - 1 > 0) { // do retry
   } else { // out of retries

and not if (tries - 1 < 0 ).

Change-Id: I6a7b681c7e7bd1a9787c640e2cdd5ab7723a74a2
Signed-off-by: Michael Vorburger <>
4 years agoBug 9165: Log config subsystem readiness as INFO 36/63136/3
Vratko Polak [Thu, 14 Sep 2017 13:10:11 +0000 (15:10 +0200)]
Bug 9165: Log config subsystem readiness as INFO

Change-Id: I487760e19ac317f7246ac9b9b47f2a65df100e6b
Signed-off-by: Vratko Polak <>
4 years agoFix sonar warnings in blueprint bundle 65/63265/4
Tom Pantelis [Tue, 19 Sep 2017 08:18:39 +0000 (04:18 -0400)]
Fix sonar warnings in blueprint bundle

- Lambdas and anonymous classes should not have too many lines
- Collapsible "if" statements should be merged
- Methods should not be too complex (Cyclomatic Complexity)
- String literals should not be duplicated
- Exception handlers should preserve the original exception
- Nested blocks of code should not be left empty

Also migrated the code to the DOMSchemaService in lieu of the
deprecated SchemaService interface.

Change-Id: I3fd51c9124fd5ebe3488c1167f3f7dd18f258314
Signed-off-by: Tom Pantelis <>
4 years agoFix testLeaderAndFollowerEntityOwnersReassignedAfterShutdown failure 55/63155/3
Tom Pantelis [Thu, 14 Sep 2017 18:50:00 +0000 (14:50 -0400)]
Fix testLeaderAndFollowerEntityOwnersReassignedAfterShutdown failure

testLeaderAndFollowerEntityOwnersReassignedAfterShutdown(org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest)  Time elapsed: 10.834 sec  <<< FAILURE!
00:35:56 java.lang.AssertionError: Last index expected:<18> but was:<19>
00:35:56  at
00:35:56  at org.junit.Assert.failNotEquals(
00:35:56  at org.junit.Assert.assertEquals(
00:35:56  at org.junit.Assert.assertEquals(
00:35:56  at org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest.lambda$testLeaderAndFollowerEntityOwnersReassignedAfterShutdown$7(
00:35:56  at org.opendaylight.controller.cluster.datastore.MemberNode.verifyRaftState(
00:35:56  at org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipIntegrationTest.testLeaderAndFollowerEntityOwnersReassignedAfterShutdown(

The problem in this run is that lastIndex on the leader updated after
it was captured. It's difficult to know when all PurgeTransaction payloads
have been committed. The test tries to force follower1 to become leader
after the current leader is shut down but it doesn't really matter which
of the remaining followers becomes leader - we only care that the expected
entities get re-assigned. So I changed the test to enable elections on all
remaining followers and not expect a particular one to grab leadership.

Change-Id: I56a457db9ca6ba07f3a2a6378b745291c54ac99e
Signed-off-by: Tom Pantelis <>
4 years agoString performance and maintenability 54/57354/8
Stephen Kitt [Thu, 18 May 2017 13:28:46 +0000 (15:28 +0200)]
String performance and maintenability

Use StringBuilder for strings built in loops. Use plain concatenation
for string construction not involving loops.

Change-Id: I8299eb54a347d132f0d19dfb39c8fb52366049f2
Signed-off-by: Stephen Kitt <>
4 years agosal-binding-dom-it: use lambdas 79/57179/6
Stephen Kitt [Tue, 16 May 2017 15:50:51 +0000 (17:50 +0200)]
sal-binding-dom-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: Id3c04094ba78356b59e3faaf3ae7bb9008146f5a
Signed-off-by: Stephen Kitt <>
4 years agosal-dom-broker-config: use lambdas 87/57187/4
Stephen Kitt [Tue, 16 May 2017 15:51:32 +0000 (17:51 +0200)]
sal-dom-broker-config: 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: Iaf552c1e280034f8a465b46b9092a7df0cec5409
Signed-off-by: Stephen Kitt <>
4 years agosal-binding-api: use lambdas 77/57177/5
Stephen Kitt [Tue, 16 May 2017 15:49:30 +0000 (17:49 +0200)]
sal-binding-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: I57045a8cfb4dc788eb0d687eceb49ca54e6dc7c8
Signed-off-by: Stephen Kitt <>
4 years agoconfig-manager-facade-xml: use lambdas 66/57166/4
Stephen Kitt [Tue, 16 May 2017 15:48:20 +0000 (17:48 +0200)]
config-manager-facade-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: I95cb63a6d919392fbc5d169de6870f81e05761be
Signed-off-by: Stephen Kitt <>
4 years agoUse foreach loops 81/57081/3
Stephen Kitt [Mon, 15 May 2017 15:54:41 +0000 (17:54 +0200)]
Use foreach loops

This automatically-generated patch replaces while loops with their
foreach equivalent.

Change-Id: I26a2bf48c7c3337414a69ed852449a1757526076
Signed-off-by: Stephen Kitt <>
4 years agoForwardingDataBroker 35/63135/2
Michael Vorburger [Thu, 14 Sep 2017 12:25:57 +0000 (14:25 +0200)]

as discussed on

Change-Id: I374d2a9f6cbad89f33e453eca270e5cc5f75a224
Signed-off-by: Michael Vorburger <>
4 years agoAdjust for yangtools normalizing module names 47/63147/2
Robert Varga [Thu, 14 Sep 2017 16:52:22 +0000 (18:52 +0200)]
Adjust for yangtools normalizing module names

Yangtools plugin normalizing names, so we need to adjust for that.

Change-Id: I4095666a57e1fde0a109eeecb487744b58505fe2
Signed-off-by: Robert Varga <>
4 years agoFix checkstyle issues to enforce it 42/63042/2
David Suarez [Tue, 12 Sep 2017 14:26:05 +0000 (16:26 +0200)]
Fix checkstyle issues to enforce it

Change-Id: I901673c4c8f478e914efd54d26bee56a80296868
Signed-off-by: David Suarez <>
4 years agoBug 9057: Revert "Take advantage of default" ... 54/62954/2
Vratko Polak [Thu, 7 Sep 2017 17:53:31 +0000 (19:53 +0200)]
Bug 9057: Revert "Take advantage of default" ...

... " methods in DOMRpcProviderService"
This reverts commit adf49155eced15c9f654d7bed7ee45cd95686e4f.

This is perhaps only a workaround,
depending on why test app expects class in the first place.

Change-Id: I68840f79aec25b128ddb78edc1a1e5514de16631
Signed-off-by: Vratko Polak <>
4 years agoFix checkstyle issues to enforce it 22/63022/1
David Suarez [Tue, 12 Sep 2017 08:28:59 +0000 (10:28 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Change-Id: Ic1c79114162d0c9772479e98df628d09daaa623b
Signed-off-by: David Suarez <>
4 years agoFix checkstyle issues to enforce it 11/63011/2
David Suarez [Tue, 12 Sep 2017 00:04:39 +0000 (02:04 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Change-Id: I4655246739b0fa44a69487314549fc00860c9ec3
Signed-off-by: David Suarez <>
4 years agoBUG-8639: always invalidate primary info cache 95/62995/1
Robert Varga [Mon, 11 Sep 2017 14:03:58 +0000 (16:03 +0200)]
BUG-8639: always invalidate primary info cache

When we remove local shard, make sure we invalidate the associated
cache entry.

Change-Id: I83d6320e7308fe9bdf9c66c928fa91198674eae1
Signed-off-by: Robert Varga <>
(cherry picked from commit 39b7a263d64559bc4f593726f56aa38ab9cc0b1c)

4 years agoFix checkstyle issues to enforce it 40/62940/4
David Suarez [Sat, 9 Sep 2017 18:27:18 +0000 (20:27 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Change-Id: I8ea15ab059b1ffa3de79737cf2ca0763f2455139
Signed-off-by: David Suarez <>
4 years agoEliminate BindingToNormalizedNodeCodecFactory.getOrCreateInstance() 31/62831/3
Robert Varga [Thu, 7 Sep 2017 11:38:23 +0000 (13:38 +0200)]
Eliminate BindingToNormalizedNodeCodecFactory.getOrCreateInstance()

This method is not referenced from anywhere, remove it.

Change-Id: Ied20fdd02491422d958ad262d2d82ee302a2c258
Signed-off-by: Robert Varga <>
4 years agoEliminate some more references to SchemaService 30/62830/3
Robert Varga [Thu, 7 Sep 2017 11:35:32 +0000 (13:35 +0200)]
Eliminate some more references to SchemaService

The only references now are in test harness, which we can clean up
once all downstreams have been migrated.

Change-Id: I4c448433d7937ad3e3b829621a0ecd361db949d1
Signed-off-by: Robert Varga <>
4 years agoFix checkstyle issues to enforce it 12/62812/7
David Suarez [Thu, 7 Sep 2017 09:18:53 +0000 (11:18 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Change-Id: I306255919cdfe43208d7c254f2f6455f4126b92f
Signed-off-by: David Suarez <>
4 years agoBug 8741: Fix broken Maven archetype 84/39484/13
Michael Vorburger [Thu, 26 May 2016 13:34:57 +0000 (15:34 +0200)]
Bug 8741: Fix broken Maven archetype

Includes migration to Karaf 4 features, as per

The main goal here was just to get what I've found to be a completely
badly broken archetype; it even had some other other problems unrelated
to Karaf 4 migration; this looks like it had been haywire for quite a
while even before the Karaf 4 migration already?

This also contributes a basis for future automated self testing; see also,
but this is skipped in this change, because while it works great locally,
it fails for some strange reason related to SFT on (only) Jenkins.

I'm hoping that this just a very first step to ongoing active
maintenance of the archetype (by myself, but hopefully others too),
without ever breaking it anymore - thanks to the new self test. Here are
some possible future TBDs:

* remove archetype.test.skip and fix weird SFT problem (@vorburger)

* re-activate commented out IT which breaks during build self test

* odl-X* feature directory names with ${artifactId} instead of X
   (dunno how to get archetype to create folders named by variables)

* karaf.localFeature which breaks during build self test

* some clean-up e.g. remove useless site generation?

* real test of the produced Karaf distro? Using Pax Exam, but not *IT..

Change-Id: I013c305fb9b63cc965cbcc112cbe6017ae47de21
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: Filter TracingBroker stack trace elements 32/62632/3
Michael Vorburger [Mon, 4 Sep 2017 15:24:49 +0000 (17:24 +0200)]
Bug 9060: Filter TracingBroker stack trace elements

Just to make them a lot easier to read, because what is really
interesting in them is the "middle part" (before the trace close
tracking infra classes and after the lower level e.g. BP set up class
stack frames).

Change-Id: I5f90b69a10ec0ea3f3e3407279c523751813418d
Signed-off-by: Michael Vorburger <>
4 years agoFix intermittent PreLeaderScenarioTest failure 67/62767/4
Tom Pantelis [Wed, 6 Sep 2017 10:59:32 +0000 (06:59 -0400)]
Fix intermittent PreLeaderScenarioTest failure

testUnComittedEntryOnLeaderChange(org.opendaylight.controller.cluster.raft.PreLeaderScenarioTest)  Time elapsed: 5.207 sec  <<< FAILURE!
java.lang.AssertionError: Did not receive message of type class org.opendaylight.controller.cluster.raft.messages.AppendEntries
  at org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor.expectFirstMatching(
  at org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor.expectFirstMatching(
  at org.opendaylight.controller.cluster.raft.PreLeaderScenarioTest.testUnComittedEntryOnLeaderChange(

The MessageCollectorActor does receive the message but occasionally out of order
w.r.t the CLEAR_MESSAGES although the latter is sent prior. The problem is that
AppendEntries is a ControlMessage so can get delivered before CLEAR_MESSAGES thus
CLEAR_MESSAGES needs to also be a ControlMessage.

Another problem with many of the tests is that MessageCollectorActors are created
as TestActors and thus get the CallingThreadDispatcher by default which really isn't
desirable. Some of the tests specifically set the default fork-join dispatcher but
we should just create MessageCollectorActors as normal actors.

Change-Id: I455a500d39aae4c46fb33d59be24c6327a9d321d
Signed-off-by: Tom Pantelis <>
4 years agoAdjust to binding codec implementation package move 13/62613/4
Robert Varga [Mon, 4 Sep 2017 11:35:57 +0000 (13:35 +0200)]
Adjust to binding codec implementation package move -> mdsal.binding.dom

Change-Id: I89a250f37e83f3a677ee2776a03847ceb814327c
Signed-off-by: Robert Varga <>
4 years agoFix checkstyle issues to enforce it 43/62743/2
David Suarez [Wed, 6 Sep 2017 07:04:49 +0000 (09:04 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Change-Id: I0657beb7831e81b1d24adcd41dc9bf23d0701d64
Signed-off-by: David Suarez <>
4 years agoFix checkstyle issues to enforce it 29/62729/2
David Suarez [Tue, 5 Sep 2017 21:01:47 +0000 (23:01 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Change-Id: I6e876b21f092b6d10e6f9ee1304ddf5a535dcb13
Signed-off-by: David Suarez <>
4 years agoFix checkstyle issues to enforce it 22/62722/1
David Suarez [Tue, 5 Sep 2017 18:50:00 +0000 (20:50 +0200)]
Fix checkstyle issues to enforce it

Fix checkstyle issues to enforce it.

Note: I had to replace the calls to MoreExecutors.sameThread() since the
module didn't compile locally. That method [1] is deprecated anyway.


Change-Id: I4263cadc0748065b20b425d6860fe36569d913b1
Signed-off-by: David Suarez <>
4 years agoAdd an explicit null data check 52/62652/3
Robert Varga [Mon, 4 Sep 2017 20:38:11 +0000 (22:38 +0200)]
Add an explicit null data check

We have observed restconf attempting to put null data into a path,
leading to an implicit NPE without any explanation. Add an explicit
guard to catch such attempts.

Change-Id: I2e2125b04782d4f1c050d0aeb72161158da28c9f
Signed-off-by: Robert Varga <>
4 years agoBug 9060: Minor mdsaltrace_config.xml /this/will/never/exist 24/62624/2
Michael Vorburger [Mon, 4 Sep 2017 13:24:42 +0000 (15:24 +0200)]
Bug 9060: Minor mdsaltrace_config.xml /this/will/never/exist

Found during use, and avoids having to do this workaround:

log:set ERROR

Change-Id: Iff5fb5eee8d938f1ec6dcb33d5d8a6ec58f2a2b9
Signed-off-by: Michael Vorburger <>
4 years agoBug 9056 - Class FileModuleShardConfigProvider does not load 34/62634/2
Jakub Toth [Mon, 4 Sep 2017 15:36:46 +0000 (17:36 +0200)]
Bug 9056 - Class FileModuleShardConfigProvider does not load
configurations from classpath properly

Change-Id: I1944e2a3c035efcbbcddb3f0680b682c5286d907
Signed-off-by: Jakub Toth <>
4 years agoSwitch to mdsal codec APIs 12/62612/2
Robert Varga [Mon, 4 Sep 2017 11:34:00 +0000 (13:34 +0200)]
Switch to mdsal codec APIs

Codec APIs with yangtools in their package are going away, make sure
we are ready for that.

Change-Id: I5515cf455df9cbdd746153a515e7102f11f02a80
Signed-off-by: Robert Varga <>
4 years agoLower verbosity in SimpletxDomRead 25/61625/5
Vratko Polak [Mon, 14 Aug 2017 15:45:22 +0000 (17:45 +0200)]
Lower verbosity in SimpletxDomRead

Info on such big objects really makes the log hard to navigate.

Change-Id: I794e06766377ddd6e09e3f2f4142719d6049ac84
Signed-off-by: Vratko Polak <>
4 years agoBug 8967 - Various classes in cntrl/md-sal use hardcoded 51/62451/11
Jakub Toth [Wed, 30 Aug 2017 14:29:46 +0000 (16:29 +0200)]
Bug 8967 - Various classes in cntrl/md-sal use hardcoded
dependencies on OSGI/karaf - PART 1

  * remove dependency of ActorSystemProviderImpl on OSGI
  * move Config out of ActorSystemProviderImpl

Change-Id: I7e9cb184385207726839e137ea6dcafd6359c47b
Signed-off-by: Jakub Toth <>
4 years agoDataChangeListener cleanup 56/62556/1
Tom Pantelis [Fri, 1 Sep 2017 15:48:12 +0000 (11:48 -0400)]
DataChangeListener cleanup

- Removed the DCL example from the car model
- Converted messagebus-impl DCL to DCTL

Change-Id: I14436f1f80642ce0d35b71be8e1ae4dae658e2a2
Signed-off-by: Tom Pantelis <>
4 years agoSeparate ShardRecoveryCoordinator implementations 60/49260/7
Robert Varga [Thu, 31 Aug 2017 20:48:04 +0000 (22:48 +0200)]
Separate ShardRecoveryCoordinator implementations

This patch turns ShardRecoveryCoordinator into two concrete
implementations based on presence of snapshot. This will allow
us to catch cases where restore from snapshot gives us a null

Furthermore it cleans up the test a bit, byu sharing coordination
instantiation code and using assertTrue/assertFalse to prevent
boxing operations implied by assertEquals.

Change-Id: I8e4ceba0ec6df70e5557f6f457c60ed2cd39a8bd
Signed-off-by: Robert Varga <>
4 years agoBug 9060: Minor [Java|inline] doc update re. getStackTrace() performance 07/62507/4
Michael Vorburger [Thu, 31 Aug 2017 16:35:39 +0000 (18:35 +0200)]
Bug 9060: Minor [Java|inline] doc update re. getStackTrace() performance

Change-Id: I4f1ab259b79154f7abc8df2d28d5ecb2ad18ef98
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: Minor update to inline documentation for new flag 06/62506/2
Michael Vorburger [Thu, 31 Aug 2017 16:19:47 +0000 (18:19 +0200)]
Bug 9060: Minor update to inline documentation for new flag

Change-Id: Id2eb1e76a8658e837166b227a30cd49ee665c258
Signed-off-by: Michael Vorburger <>
4 years agoBUG-9054: do not use BatchedModifications needlessly 24/62524/2
Robert Varga [Wed, 30 Aug 2017 14:28:28 +0000 (16:28 +0200)]
BUG-9054: do not use BatchedModifications needlessly

Transaction identifier, which is a required parameter for
BatchedModifications is a resource tracked on the backend and is
assumed to be allocated contiguously. Using BatchedModifications
to transport only a list of modifications means we are allocating
transactions IDs which we then never use.

This patch reworks the logic so it tracks modifications in a list
and allocates BatchedModifications only when we are ready to actually
commit something.

Change-Id: I3f71511cfd68e96e80790e69d28d083f195e5e12
Signed-off-by: Robert Varga <>
(cherry picked from commit 71a4b6377ba598b18c64b89b6b16538751d2d116)

4 years agoBug 9008: Fix the error of the persisted journal data format 67/61967/3
HeYunBo [Fri, 18 Aug 2017 12:31:39 +0000 (20:31 +0800)]
Bug 9008: Fix the error of the persisted journal data format

We have to clear the lastLeafSetQName while processing the end event for node
in NormalizedNodeInputStreamReader and AbstractNormalizedNodeDataOutput.

Otherwise while processing the leaf-list node, the leaf-list entry node
may use the other LeafSetQName as it's node identifier incorrectly.
The DataTree reconstructed from the persisted journal after the controller
restart will be not equal to the DataTree before restart under certain

Change-Id: I4ee823f59fe477d08f982ae73e3850433dfea8ee
Signed-off-by: HeYunBo <>
4 years agoMinor: mdsal-trace-api does not need sal-broker-impl, just sal-core-api 30/62430/2
Michael Vorburger [Tue, 29 Aug 2017 20:24:40 +0000 (22:24 +0200)]
Minor: mdsal-trace-api does not need sal-broker-impl, just sal-core-api

This is not directly related to / strictly required by Bug 9060, but
I've found while hacking on and testing that, and thought it would be
good to clean up.

Change-Id: I749e63025060ee2d51fe04d0ab4eb932c13f6c25
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: Karaf CLI command to print open transactions 02/62402/8
Michael Vorburger [Tue, 29 Aug 2017 12:22:59 +0000 (14:22 +0200)]
Bug 9060: Karaf CLI command to print open transactions

including some minor changes to make output more pretty / readable.

This is, for now, the last in a serious of commits which is part of a
solution I'm proposing in order to be able to detect OOM issues such as
Bug 9034, based on using the mdsal-trace DataBroker.

Change-Id: I83af00a0713be4e8fab3085942b7b57d7183a20c
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: TracingBroker printOpenTransactions 73/62373/7
Michael Vorburger [Mon, 28 Aug 2017 16:38:50 +0000 (18:38 +0200)]
Bug 9060: TracingBroker printOpenTransactions

This method is intended to be used from a Karaf CLI command in the next
change (and maybe JMX or something else like that later), which can be
invoked during future automated testing to detect Tx leaks during CSIT.

This is one of a serious of commits which is part of a solution I'm
proposing in order to be able to detect OOM issues such as Bug 9034,
based on using the mdsal-trace DataBroker.

Change-Id: I682700bef9644834e8b4ca36b21729f021a76bf0
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: Remove un-used Instant getObjectCreated() from CloseTracked 70/62370/4
Michael Vorburger [Mon, 28 Aug 2017 15:27:17 +0000 (17:27 +0200)]
Bug 9060: Remove un-used Instant getObjectCreated() from CloseTracked

I initially thought that it would be "interesting" to be able to do some
sort of output sorted by the age of the object creating kind of UX in
the CLI I'm planning to propose next, but ultimately realized that
keeping an extra Instant fields in EACH CloseTracked (e.g. Tx) is just
overhead and not really adding much value (because the NUMBER of
non-closed objects is MUCH more interesting than this timestamp..), thus
removing this again after all.

This is one of a serious of commits which is part of a solution I'm
proposing in order to be able to detect OOM issues such as Bug 9034,
based on using the mdsal-trace DataBroker.

Change-Id: Ie40fe23ce2af670902ff8e44a6757ebdf9ef915e
Signed-off-by: Michael Vorburger <>
4 years agoBug 9056 - Class FileModuleShardConfigProvider does not load 39/62439/3
Jakub Toth [Wed, 30 Aug 2017 08:56:58 +0000 (10:56 +0200)]
Bug 9056 - Class FileModuleShardConfigProvider does not load
configurations from classpath properly

Change-Id: If1be5fa92eb98a91266353ece8ccc9cadf27c22e
Signed-off-by: Jakub Toth <>
4 years agoRemove sal-binding-config from toaster poms 35/62435/2
Tom Pantelis [Wed, 30 Aug 2017 02:48:37 +0000 (22:48 -0400)]
Remove sal-binding-config from toaster poms

sal-binding-config is a CSS remnant and is not needed.

Change-Id: I51be2818d9b247e7c6494c1ff88d3804cb0fc3d5
Signed-off-by: Tom Pantelis <>
4 years agoFix intermittent testOwnerChangesOnPeerAvailabilityChanges failure 28/62428/3
Tom Pantelis [Tue, 29 Aug 2017 19:42:12 +0000 (15:42 -0400)]
Fix intermittent testOwnerChangesOnPeerAvailabilityChanges failure

EntityOwnershipShardTest.testOwnerChangesOnPeerAvailabilityChanges:647->AbstractEntityOwnershipTest.verifyRaftState:280->lambda$testOwnerChangesOnPeerAvailabilityChanges$2:648 getRaftState expected:<[]Leader> but was:<[Pre]Leader>

It seems this was indirectly introduced by the addition of the
PurgeTransactionPayload - changes the timing of things a bit. I added
code to ensure peer2's lastAppliedIndex is up-to-date with the leader's
prior to stopping the leader to make it deterministic (ie peer2 should
be able to go straight to Leader).

Change-Id: I9abb950c7dc67b2d481d07b9b421ae46421b6510
Signed-off-by: Tom Pantelis <>
4 years agoBug 9060: mdsal-trace tooling with getAllUnique() to find Tx leaks 63/62363/5
Michael Vorburger [Mon, 28 Aug 2017 11:22:43 +0000 (13:22 +0200)]
Bug 9060: mdsal-trace tooling with getAllUnique() to find Tx leaks

This is one of a serious of commits which is part of a solution I'm
proposing in order to be able to detect OOM issues such as Bug 9034,
based on using the mdsal-trace DataBroker.

Change-Id: I9cf4d8d9965468d77a0d82455655b9445535f0b0
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: TracingBroker with transaction-debug-context-enabled 94/62294/5
Michael Vorburger [Thu, 24 Aug 2017 20:37:51 +0000 (22:37 +0200)]
Bug 9060: TracingBroker with transaction-debug-context-enabled

This is one of a serious of commits which is part of a solution I'm
proposing in order to be able to detect OOM issues such as Bug 9034,
based on using the mdsal-trace DataBroker.

Change-Id: If62b7f76ea03d8cabe0c5a2088983275cfe50e44
Signed-off-by: Michael Vorburger <>
4 years agoBug 9060: Fix odl-mdsal-trace's missing mdsaltrace_config.xml 29/62429/1
Michael Vorburger [Tue, 29 Aug 2017 20:06:00 +0000 (22:06 +0200)]
Bug 9060: Fix odl-mdsal-trace's missing mdsaltrace_config.xml

This seems to have gotten lost in the Karaf 4 migration.


Change-Id: Id7c20c1daaaeb0844ef2278fe4931b24e7ef5b5d
Signed-off-by: Michael Vorburger <>
4 years agoFix intermitent testFollowerResyncWith*LeaderRestart failure 81/62381/1
Tom Pantelis [Mon, 28 Aug 2017 19:44:31 +0000 (15:44 -0400)]
Fix intermitent testFollowerResyncWith*LeaderRestart failure

NonVotingFollowerIntegrationTest#testFollowerResyncWithOneMoreLeaderLogEntryAfterNonPersistentLeaderRestart fails intermittently:

NonVotingFollowerIntegrationTest.testFollowerResyncWithOneMoreLeaderLogEntryAfterNonPersistentLeaderRestart:233 Did not receive message of type class org.opendaylight.controller.cluster.raft.base.messages.SnapshotComplete

This seems to be a side-effect of
which changes the timing a bit such that an install snapshot doesn't occur on the
follower which should happen in order to completely re-sycnc it with the leader -
instead it ends up removing the stale out-of-sync entries and appending the new ones
from the leader which gets the journal up-to-date but the stale entries had already
been applied to the state which leaves the state out-of-sync with journal. I added
an additional check in the follower to force the leader to install a snapshot
if the first out-of-sync log entry index <= the lastAppliedIndex which means the
entries to be removed have already been applied to the state.

Change-Id: Ic3815a694a8531d9f7f42f19ad8978d52fc902b3
Signed-off-by: Tom Pantelis <>
4 years agoBug 8994 - FileModuleShardConfigProvider should not use hard-coded paths 53/62253/3
Jakub Toth [Thu, 24 Aug 2017 08:29:39 +0000 (10:29 +0200)]
Bug 8994 - FileModuleShardConfigProvider should not use hard-coded paths

  * move setting paths to blueprint
  * fix tests

Change-Id: If1e79b3d33d969167327819a1d13da00ee4bc882
Signed-off-by: Jakub Toth <>
4 years agoBug 9034: TracingBroker with TracingReadOnlyTransaction 89/62289/2
Michael Vorburger [Thu, 24 Aug 2017 17:31:23 +0000 (19:31 +0200)]
Bug 9034: TracingBroker with TracingReadOnlyTransaction

The new TracingReadOnlyTransaction wrapper doesn't do anything
interesting yet - but it will, in the related upcoming next change.

This is one of a serious of (small, easy to review) commits which is
part of a solution I'm proposing in order to be able to detect OOM
issues such as Bug 9034, based on using the mdsal-trace DataBroker.

Change-Id: Ifa82c50d9c9eac76af99bf6a58e5e1955ee7429c
Signed-off-by: Michael Vorburger <>
4 years agoBug 9034: TracingBroker with TracingTransactionChain 88/62288/2
Michael Vorburger [Thu, 24 Aug 2017 17:24:59 +0000 (19:24 +0200)]
Bug 9034: TracingBroker with TracingTransactionChain

This is one of a serious of (small, easy to review) commits which is
part of a solution I'm proposing in order to be able to detect OOM
issues such as Bug 9034, based on using the mdsal-trace DataBroker.

Change-Id: I098c48a1fce1da2fdd0aafdc82fd3bef5626988a
Signed-off-by: Michael Vorburger <>
4 years agoBUG-2643: enable checkstyle/findbugs in archetype 70/62270/3
Robert Varga [Thu, 24 Aug 2017 12:25:41 +0000 (14:25 +0200)]
BUG-2643: enable checkstyle/findbugs in archetype

New projects should have these set from the get go.

Change-Id: Ic85cdd003ecb1fe49326d3d6a1b1099d09522ebb
Signed-off-by: Robert Varga <>
4 years agoToaster is shardless 95/62295/2
Robert Varga [Thu, 24 Aug 2017 23:33:54 +0000 (01:33 +0200)]
Toaster is shardless

It's not like we broke it into shards. Nothing like that, our toaster
is fully working. Nevertheless it is a sample and has no place
in production code nor its configuration.

Change-Id: Ie14c698c1ea45a5fe201d1b6227eeb4f2d9790a5
Signed-off-by: Robert Varga <>
4 years agoFix deprecation warning in PingPongTransactionChain 64/62264/1
Robert Varga [Thu, 24 Aug 2017 11:10:58 +0000 (13:10 +0200)]
Fix deprecation warning in PingPongTransactionChain

Add MoreExecutors.directExecutor(). Also fix up formatting.

Change-Id: I4dcc849c643713b738f2d99b1250848e46fbe82a
Signed-off-by: Robert Varga <>
4 years agoBUG-9028: make NonPersistentDataProvider schedule invocation 55/62255/1
Robert Varga [Tue, 22 Aug 2017 17:59:21 +0000 (19:59 +0200)]
BUG-9028: make NonPersistentDataProvider schedule invocation

We need to make NonPersistentDataProvider behave in a fashion
similar to what PersistentDataProvider does for asynchronous
persistence calls, which is schedule execution of the provided
procedure rather than direct execution (which is fair for synchronous

In order to make that work we introduce ExecuteInSelfActor, which
has an executeInSelf() method, which uses internal mechanics to
schedule the call at a later point.

Change-Id: I116708d98154c8244ea80b4a1a1aa615abc3075d
Signed-off-by: Robert Varga <>
(cherry picked from commit b66d6180f06097e3501a88aac9fb684336addd58)

4 years agoAdd debug to pinpoint lastApplied movement 21/62221/2
Robert Varga [Mon, 21 Aug 2017 16:35:20 +0000 (18:35 +0200)]
Add debug to pinpoint lastApplied movement

This method is called from multiple call sites, only one of which
is actually logging the change. Make sure we catch all transitions
by adding a LOG.debug() into the setter.

Change-Id: Ie777f8047a0893f9450fb132faa8adea235fbc5f
Signed-off-by: Robert Varga <>
4 years agoRemove remnants of proto generation 46/62146/2
Robert Varga [Tue, 22 Aug 2017 11:15:28 +0000 (13:15 +0200)]
Remove remnants of proto generation

This README and shell script are no longer relevant, as we do not
have any .proto files.

Change-Id: If3f6204c5d9e607b66a5eed3ecea56e5b5294023
Signed-off-by: Robert Varga <>
4 years agoFix bluprint logging 91/62191/1
Robert Varga [Wed, 23 Aug 2017 09:34:31 +0000 (11:34 +0200)]
Fix bluprint logging

The log call is missing arguments, leading to a useless message,
fix that.

Change-Id: Ia6ae2d760724d2809ce30798aaf1b32465205824
Signed-off-by: Robert Varga <>
4 years agoMake testTransactionForwardedToLeaderAfterRetry purge-aware 26/61726/3
Robert Varga [Mon, 14 Aug 2017 20:53:15 +0000 (22:53 +0200)]
Make testTransactionForwardedToLeaderAfterRetry purge-aware

At the point where we are waiting for transaction replication
to fully propagate, we need to account for the purge request,
as otherwise the configuration could interfere with index

Change-Id: I13f93e306e5b77304916e4c05f39dc28fb9cc049
Signed-off-by: Robert Varga <>
(cherry picked from commit d1de9c55e280fc6a972b0cd408189057446c45a0)

4 years agoMake ShardTest.testCommitWhenTransactionHasModifications() wait a bit 03/61703/3
Robert Varga [Mon, 14 Aug 2017 16:03:51 +0000 (18:03 +0200)]
Make ShardTest.testCommitWhenTransactionHasModifications() wait a bit

Committed transactions involve also a purge payload, which is persisted
asynchronously, hence it may or may not be visible in the journal just
after the transaction is reported as committed. Wait for two heartbeat
intervals before looking at the stats.

Change-Id: Ibe699edced12d006bf5ea8cd99aa821ab56d115d
Signed-off-by: Robert Varga <>
4 years agoBump karaf-empty dependency version to 2.0.4 59/61759/1
Vratko Polak [Tue, 15 Aug 2017 11:08:24 +0000 (13:08 +0200)]
Bump karaf-empty dependency version to 2.0.4

Change-Id: I15329e8d207fdeaceee4b75a731391f2924bae03
Signed-off-by: Vratko Polak <>
4 years agoBump versions by x.(y+1).z for next dev cycle 72/61672/1
Thanh Ha [Mon, 14 Aug 2017 17:05:14 +0000 (13:05 -0400)]
Bump versions by x.(y+1).z for next dev cycle

Change-Id: I007759fbe7e12c4b58189462fa7c676adf7f972f
Signed-off-by: Thanh Ha <>
4 years agoAdd MXBean to report shard registered DTCL/DCL info 87/59587/5
Tom Pantelis [Tue, 27 Jun 2017 20:09:32 +0000 (16:09 -0400)]
Add MXBean to report shard registered DTCL/DCL info

It's useful to see what listeners (DTCL/DCL) are registered for each shard.
Added a new message, GetInfo, sent to the DTCL/DCL actors that returns
DataTreeListenerInfo, including the stringified user listener instance
and the stringified YangInstanceIdentifier path. A new
ShardDataTreeListenerInfoMXBean is instantiated for each shard which
reports the DTCL and DCL info.

Change-Id: I312bc5d03fe836bc208ea442ebc2af0ef103120f
Signed-off-by: Tom Pantelis <>
4 years agoBUG-8941: enqueue purges once ask-based transactions resolve 84/61284/5
Robert Varga [Mon, 7 Aug 2017 16:16:23 +0000 (18:16 +0200)]
BUG-8941: enqueue purges once ask-based transactions resolve

Backend state tracking relies on the transaction log to propagate
transaction state from the leader to followers. This includes purging
of transactions, i.e. the information that the frontend will not need
the state (and the final resolution of the transaction).

Tell-based protocol handles this on the frontend, ask-based needs to
do this on the backend (as it has no notion of transaction continuation).

Change-Id: I49e787b38998ef67b4a9ef504a70822263e1a340
Signed-off-by: Robert Varga <>
4 years agoEliminate protocol-framework 03/60903/3
Robert Varga [Sat, 29 Jul 2017 09:53:35 +0000 (11:53 +0200)]
Eliminate protocol-framework

This piece of code has been moved to netconf, eliminate it from

Change-Id: I1a04ed800d88ab49ef6e1d0782ca722f18e16581
Signed-off-by: Robert Varga <>
4 years agoBump odlparent 2.0.2 to 2.0.4 67/61367/2
Stephen Kitt [Tue, 8 Aug 2017 16:21:03 +0000 (18:21 +0200)]
Bump odlparent 2.0.2 to 2.0.4

Change-Id: Iea7270b110536c10878d130db33409ed08dde987
Signed-off-by: Stephen Kitt <>
4 years agoFixup static method warnings 99/61099/2
Robert Varga [Thu, 3 Aug 2017 09:34:07 +0000 (11:34 +0200)]
Fixup static method warnings

- a method can be made static
- invocation of static methods should not go through an instance

Change-Id: I9380a17432340c75fd94bd01c9dc5bb5cdbd8156
Signed-off-by: Robert Varga <>
4 years agoBug 8885: Fix DistributedShardedDOMDataTree initialization 80/60780/4
Tom Pantelis [Wed, 26 Jul 2017 16:16:48 +0000 (12:16 -0400)]
Bug 8885: Fix DistributedShardedDOMDataTree initialization

DistributedShardedDOMDataTree initialization expects the prefix
configuration shard to be present and ready with leader however
the latter isn't the case when the static module-shards is
bootstrapped without the local member so it can be dynamically
joined into an existing cluster. So I modified the ConfigShardLookupTask
to elide the ConfigShardReadinessTask.

Once past that, creation of the prefix-based default shard is attempted
as there isn't a local module-based shard however this fails b/c the
local prefix configuration shard is not connected to a leader. To alleviate
this I just commented out the code to create the shard. Since the default
shard configuration is present in the out-of-box modules.conf and is
expected to be present, we can assume at this point that the local member
isn't in the replica list with the intention of dynamically joining it to
an existing cluster, at which time the shard will be created.

These changes at least fix the regression with the boostrapping scenario.
We can revisit this iniialization later w.r.t. prefix-based shards.

Change-Id: I1faf531f4c79914d45203ee132dd4e65ad2f18ba
Signed-off-by: Tom Pantelis <>
4 years agoDeprecate 78/61078/2
Robert Varga [Wed, 2 Aug 2017 21:32:28 +0000 (23:32 +0200)]

This is a utility class, which has a conterpart in mdsal. Deprecate it
and related classes, migrating users.

Change-Id: I8206350ddb60bb19aed93ff3840e0e68e288d55a
Signed-off-by: Robert Varga <>
4 years agoDeprecated controller fine-grained sharding APIs 77/61077/1
Robert Varga [Wed, 2 Aug 2017 21:18:57 +0000 (23:18 +0200)]
Deprecated controller fine-grained sharding APIs

These are not maintained nor were they ever implemented. Deprecate
them and point to their mdsal counterparts to reduce confusion.

Change-Id: Idd1908c65b0737df0a3731e6e81a7d1c71f272d0
Signed-off-by: Robert Varga <>
4 years agoRemove logback related stuff 33/60833/3
Michael Vorburger [Thu, 27 Jul 2017 18:55:27 +0000 (00:25 +0530)]
Remove logback related stuff

as discussed on '

Change-Id: I09146cd363d1ab706143bc12c8b1e37aa96c8723
Signed-off-by: Michael Vorburger <>
4 years agoOptimize use of YangInstanceIdentifier.getPathArguments() 07/60907/6
Robert Varga [Sat, 29 Jul 2017 12:05:36 +0000 (14:05 +0200)]
Optimize use of YangInstanceIdentifier.getPathArguments()

This method returns a list, hence we can lookup the first item
without iterating and also can use Lists.transform().

Change-Id: Ie26bfcc225c74154d65ef963e3444ac5ec10bafb
Signed-off-by: Robert Varga <>
4 years agoBUG-8898: prioritize InternalCommand 81/60981/1
Robert Varga [Mon, 31 Jul 2017 14:08:22 +0000 (16:08 +0200)]
BUG-8898: prioritize InternalCommand

InternalCommand requests should be processed as soon as possible,
and since we are already using ControlAwareMailbox, this is as simple
as marking InternalCommand as a ControlMessage.

Change-Id: Ic6025f4254da47801676c0c474d03e18abbf8f50
Signed-off-by: Robert Varga <>
(cherry picked from commit 2ac32ea2c4f57993a1dc49ef8ce380cb03acc822)

4 years agoBUG-8898: do not invoke timeouts directly 80/60980/1
Robert Varga [Mon, 31 Jul 2017 13:54:12 +0000 (15:54 +0200)]
BUG-8898: do not invoke timeouts directly

Request timeouts are occuring with the connection lock held,
at which point the connection can be at the tail of a successor

oldestConnection -> olderConnection -> connection

If the callback being invoked attempts to transmit an entry,
we will end up attempting to lock the entire chain. This would not
be a problem except that if there is a concurrent attempt to lock
the entire chain it ends up holding the lock of oldestConnection
and it is waiting for the lock on connection -- which will only be
released once the callback finishes executing, but that in turn
waits for oldestConnection to be unlocked -- a classic AB/BA deadlock.

This patch alleviates the problem by deferring callback execution
via executeInActor, i.e. the timeout will be delivered at as part
of normal message processing.

Change-Id: I237908cf214bcdfd477fe0212d09b207a0c2cdbf
Signed-off-by: Robert Varga <>
(cherry picked from commit 4367f456f3c7a30c8ee9c7bca738b3e120a4e1d1)

4 years agoBug 8879: Migrate controller to the new XML parser 13/60913/9
Igor Foltin [Sun, 30 Jul 2017 08:41:42 +0000 (10:41 +0200)]
Bug 8879: Migrate controller to the new XML parser

Migrate blueprint to the new XML parser from YANG tools.

Change-Id: Ib82da2f4b2b49dde7df78f425c700b9d3f473a26
Signed-off-by: Igor Foltin <>
4 years agoTake advantage of default methods in DOMRpcProviderService 35/51035/11
Robert Varga [Wed, 25 Jan 2017 22:05:02 +0000 (23:05 +0100)]
Take advantage of default methods in DOMRpcProviderService

We can make one of the methods default, as all implementations
are exactly the same (codifying contract).

Change-Id: I64f0b62fd3a0987ed1ed01ec14b2c4d3b77560ac
Signed-off-by: Robert Varga <>