7 years agoRemove useless .gitignore 34/40934/5
Alexis de Talhouët [Tue, 28 Jun 2016 12:51:08 +0000 (08:51 -0400)]
Remove useless .gitignore

src/main/yang doesn't contain any models, nor nothing.
So it is safe to remove this gitignore

Change-Id: Ib97cb5b1443a02399d8ce3c0c8b56c7a44ee614b
Signed-off-by: Alexis de Talhouët <>
7 years agoAdd again mdsal-singleton but remove prefix DOM 17/42317/4
Vaclav Demcak [Fri, 22 Jul 2016 10:54:16 +0000 (12:54 +0200)]
Add again mdsal-singleton but remove prefix DOM

We have only one implementation of ClusterSingletonServiceProvider
(DOM implementation) and we'd like to present it without DOM prefix.

* remove DOM prefix from ConfigSubsystem yang
* again add the odl-mdsal-singleton-dom feature
* again add CSSProvider in 06-clustered-entity-ownership.xml file

depends on:

Change-Id: Ieae0d462fe9fa523b2b1b18528759e0614b0225f
Signed-off-by: Vaclav Demcak <>
7 years agoFix delete snapshots criteria 03/42303/2
Tom Pantelis [Thu, 21 Jul 2016 23:09:47 +0000 (19:09 -0400)]
Fix delete snapshots criteria

When a snapshot is saved, we attempt to delete prior snapshots as only
the last one is recovered from persistence. For the maxSequenceNr in the
criteria, we use snapshot sequenceNr - snapshot batch count. However
this assumes every snapshot is based on snapshot batch count. We may
snapshot for other reasons, eg install snapshot on follower. This can
leave multiple prior snapshots behind and use up significant disk space.

We should only retain the last snapshot saved so I changed the criteria
to use: maxSequenceNr = the saved snapshot sequenceNr (it's possible the
sequenceNr hasn't changed from th elast snapshot) and maxTimeStamp =
saved snapshot timestamp -1.

Change-Id: I35b1d71ed433d52ecff79ca07a81616e393a7b7f
Signed-off-by: Tom Pantelis <>
7 years agoAdd mdsal-eos-binding-adapter feature 66/42166/2
Tom Pantelis [Wed, 20 Jul 2016 06:54:59 +0000 (02:54 -0400)]
Add mdsal-eos-binding-adapter feature

Added the feature that contains the binding adapter implementation of
the EntityOwnershipService.

Change-Id: Iccdd99833938b827e69603412385392b98b62abf
Signed-off-by: Tom Pantelis <>
7 years agoComment out mdsal-signleton-service in controller 11/42311/1
Vaclav Demcak [Fri, 22 Jul 2016 12:11:44 +0000 (14:11 +0200)]
Comment out mdsal-signleton-service in controller

We'd like to have only one (DOM) ClusterSingletonServiceProvider in ODL.
So we have to commented out all actual reference for CSS DOM API in
controller and we'll able to clean MD-SAL CSS projects for DOM API
and stay with common API only.

So this patch has to be applay before

Change-Id: I110b4554e4713802b9c261de8b1fd793eabb012a
Signed-off-by: Vaclav Demcak <>
7 years agoChange default value of parameter "auto-down-unreachable-after" 94/42094/6
Sai MarapaReddy [Tue, 19 Jul 2016 20:49:21 +0000 (13:49 -0700)]
Change default value of parameter "auto-down-unreachable-after"

Akka documentation suggests not using auto-down feature
in production scenario.
Link -

Change-Id: I24205a34e13c711791186b1e00d5203f623a0478
Signed-off-by: Sai MarapaReddy <>
Author: Sai MarapaReddy <>

7 years agoRemove global BindingToNormalizedNodeCodec instance 43/40743/7
Tom Pantelis [Wed, 22 Jun 2016 20:01:49 +0000 (16:01 -0400)]
Remove global BindingToNormalizedNodeCodec instance

The BindingToNormalizedNodeCodec was made a global static instance for
backwards compatibility for CSS users that inject the binding-dom-mapping-service
identity which defines the provided service as the concrete
BindingToNormalizedNodeCodec class instead of an interface. Therefore
the global static instance was created via blueprint and advertised via
its interfaces and was obtained via the static reference by the
RuntimeMappingModule for use by CSS users. The RuntimeMappingModule must
return an instance of BindingToNormalizedNodeCodec in order to provide
the binding-dom-mapping-service so obtaining the blueprint advertised OSGi
service via its interfaces and casting to BindingToNormalizedNodeCodec
failed b/c Aries creates a service proxy which loses the fact that it's a
BindingToNormalizedNodeCodec instance.

However the global BindingToNormalizedNodeCodec instance is not clean and
is problematic for supporting blueprint container restarts. Aries supports
concrete class proxies so I added an additional service export for the
BindingToNormalizedNodeCodec class in the binding-broker blueprint XML.
In addition, the blueprint XML now calls a new method, "newInstance", on the
BindingToNormalizedNodeCodecFactory to create a new instance and calls a
new method, "registerInstance", to register it with the SchemaService. The
returned ListenerRegistration instance is put into a bean so it can be
closed on destroy. The RuntimeMappingModule now obtains the
BindingToNormalizedNodeCodec instance from the OSGi registry as the other
blueprint-bridged CSS modules do. This eliminates the need for the global

Change-Id: I969ad5470967a81b37078393701c69d1898086cd
Signed-off-by: Tom Pantelis <>
7 years agoEnsure CSS modules are closed before blueprint containers on shutdown 01/40801/4
Tom Pantelis [Thu, 23 Jun 2016 14:35:07 +0000 (10:35 -0400)]
Ensure CSS modules are closed before blueprint containers on shutdown

Change-Id: I9be36a819423e904030540b161437b6f2ffd091d
Signed-off-by: Tom Pantelis <>
7 years agoExtend clustered-app-config to read default data from XML file 02/41902/4
Tom Pantelis [Fri, 15 Jul 2016 15:28:48 +0000 (11:28 -0400)]
Extend clustered-app-config to read default data from XML file

The default data can be specified in the clustered-app-config element
but it's also useful for scripting/automation or convenience to be able
to specify the default data in external XML file. The
clustered-app-config will now look for a file of the form

  <yang module name>_<container name>.xml

in a well-known location, etc/opendaylight/datastore/initial/config.

The XML file name can also be explicitly specified via the
"default-config-file-name" attribute.

Change-Id: Id310ef5ae121b8b9444a2102b93c3e382e421687
Signed-off-by: Tom Pantelis <>
7 years agoFix compiler error due to removal of InMemoryDataTreeFactory.create 60/42160/1
Tom Pantelis [Wed, 20 Jul 2016 05:38:12 +0000 (01:38 -0400)]
Fix compiler error due to removal of InMemoryDataTreeFactory.create

Change-Id: I016c1beeb55a438ba56b8076c7e792c79ac51294
Signed-off-by: Tom Pantelis <>
7 years agoAdd odl-mdsal-singleton-dom feature and CSS yang 93/42093/2
Tom Pantelis [Tue, 19 Jul 2016 01:30:39 +0000 (21:30 -0400)]
Add odl-mdsal-singleton-dom feature and CSS yang

Added the odl-mdsal-singleton-dom feature to the odl-mdsal-local-broker

Also added CSS yang and Module class for the
DOMClusterSingletonServiceProvider and added the XML to the existing
06-clustered-entity-ownership.xml file.

Change-Id: I69c7224fd7aa12742778670e7aec53118bf98332
Signed-off-by: Tom Pantelis <>
7 years agoConvert distributed EOS impl to use new DOM EOS interfaces 75/35475/14
Tom Pantelis [Fri, 26 Feb 2016 11:01:10 +0000 (06:01 -0500)]
Convert distributed EOS impl to use new DOM EOS interfaces

Change-Id: I5b2a6098a0c15f74ec2f16cb5451f3831ed913bf
Signed-off-by: Tom Pantelis <>
7 years agoAdd legacy pre-Boron EntityOwnershipService adapter 42/35442/15
Tom Pantelis [Fri, 26 Feb 2016 04:54:38 +0000 (23:54 -0500)]
Add legacy pre-Boron EntityOwnershipService adapter

Added a class that bridges between the legacy pre-Boron EntityOwnershipService
and DOMEntityOwnershipService interfaces. Also added the config yang and
Module class.

Change-Id: I77d02cb98a7dd5a713269907af7f269171c93fa8
Signed-off-by: Tom Pantelis <>
7 years agoAdded config model for mdsal.binding.codec. 15/41815/6
Tony Tkacik [Thu, 14 Jul 2016 09:56:44 +0000 (11:56 +0200)]
Added config model for mdsal.binding.codec.

Change-Id: I3ee74461e79c3332a0e8e41afe1d56af4b942a74
Signed-off-by: Tony Tkacik <>
7 years agoSwitch to StandardCharsets 81/41981/2
Robert Varga [Mon, 18 Jul 2016 14:40:07 +0000 (16:40 +0200)]
Switch to StandardCharsets

Guava's Charsets should not be used when StandardCharsets are

Change-Id: I7c52bd3070bb48857cbba82e8d4bc5993d7aea9d
Signed-off-by: Robert Varga <>
7 years agoUse mdsal.dom.codec instead of 11/41811/2
Tony Tkacik [Thu, 14 Jul 2016 09:26:24 +0000 (11:26 +0200)]
Use mdsal.dom.codec instead of

Change-Id: I90d7ccd2e9c994305931288fc39f0c990a28a866
Signed-off-by: Tony Tkacik <>
7 years agoBUG-4167: fall back to unknown module for empty YangInstanceIdentifier 87/41887/2
Robert Varga [Fri, 15 Jul 2016 10:43:58 +0000 (12:43 +0200)]
BUG-4167: fall back to unknown module for empty YangInstanceIdentifier

When we encounter an empyt YangInstanceIdentifier (for
example during listener registration), we cannot extract
a module name -- fallback to unknown, which will cause
us to talk to the default shard.

Change-Id: I2162884c5ce0d2c2f714bb66afd82f699c52d789
Signed-off-by: Robert Varga <>
7 years agoBug 6186 - fix testCandidateSerialization() 91/41691/5
Isaku Yamahata [Tue, 12 Jul 2016 04:15:53 +0000 (21:15 -0700)]
Bug 6186 - fix testCandidateSerialization()

The changeset of 97ff7dff8e58531065833736d5788808ca9e0396 make
LocalHistoryIdentifier#write() use WritableObjects#writeLongs()
instead of WritableObjects#writeLong(). In some situations, the
header length of object may be shorter.
As a result CommitTransactionPayloadTest#testCandidateSerialization()
failes. This patch fixes it by setting transaction id,
history transaction id to known value when setting up test.

Change-Id: I7fbd912564a25c92bc29f7e10bdae8ce1be52b8f
Signed-off-by: Isaku Yamahata <>
7 years agoReduce ConflictingVersionException log level to debug 47/41847/2
Sai MarapaReddy [Thu, 14 Jul 2016 16:50:11 +0000 (09:50 -0700)]
Reduce ConflictingVersionException log level to debug

In general it happens when there is  a ConflictingVersionException,
it retries and if it times out while retrying, it will log the error

The ConflictingVersionException is similar to the OptimisticLockFailuerEx
in the data store, i.e. the current config version is incremented and
recorded at the start of a push and if a second config is pushed before
 the first completes, the version changes and it detects that and
 re-pushes the first config. The CSS pushes one config at a time
 but this can happen during dependency resolution if it finds a
 dependent module that wasn't created yet or its config changed
 and needs to be dynamically recreated. The dependent module is
 pushed which results in a conflicting version. This
 happens with BGP.

Signed-off-by: Sai MarapaReddy <>
Author: Sai MarapaReddy <>
Change-Id: Ic1d4639625fa54ccc3d54331a960f421ad6fa1dd

7 years agoSet karaf.delay.console=true in etc/ 62/40262/2
Michael Vorburger [Mon, 13 Jun 2016 23:18:11 +0000 (01:18 +0200)]
Set karaf.delay.console=true in etc/

$ ./karaf
Apache Karaf starting up. Press Enter to open the shell now...
 78% [=========================================>          ]
100% [====================================================]

Karaf started in 23s. Bundle stats: 276 active, 276 total

Change-Id: Iad04b7d03aa5be5dc17e28c4d60a56ded8a2f774
Signed-off-by: Michael Vorburger <>
7 years agoDo not fix JUnit version (to 4.12), but inherit 28/41328/2
Michael Vorburger [Tue, 5 Jul 2016 12:07:46 +0000 (14:07 +0200)]
Do not fix JUnit version (to 4.12), but inherit

Found this during analysis of while grepping code
for JUnit 4.11 VS 4.12.  (This change does NOT fix bug 6156 of course,
it has nothing to do with it, but it still seemed like a sensible thing
to do.)

Change-Id: I5fb5f84ea3eda5d8ce0c21c5426e183f56762e2a
Signed-off-by: Michael Vorburger <>
7 years agoDo not override jolokia version 13/41713/2
Robert Varga [Tue, 12 Jul 2016 13:33:38 +0000 (15:33 +0200)]
Do not override jolokia version

Jolokia version is defined in odlparent (as 1.3.3), do not override that.

Change-Id: Ibaa663f9c91ce60cdd809bca1fa7d6a9262e3043
Signed-off-by: Robert Varga <>
7 years agoBug 6102: Upgrade ietf-{inet,yang}-types to 2013-07-15 95/40795/8
Lorand Jakab [Thu, 23 Jun 2016 22:14:35 +0000 (17:14 -0500)]
Bug 6102: Upgrade ietf-{inet,yang}-types to 2013-07-15

Change-Id: Id434ae938946ff0b4a7b0798d538149f6bf6b15c
Signed-off-by: Lorand Jakab <>
7 years agoBUG-5280: refactor CohortEntry 28/41428/3
Robert Varga [Wed, 6 Jul 2016 17:46:39 +0000 (19:46 +0200)]
BUG-5280: refactor CohortEntry

CohortEntry can be created in two transaction states: open and ready.
Make this explicit by hiding the two constructors and exposing two
explicit factory methods.

Change-Id: I33cb5a272828b23b8a6a2da5fad2ac3ead83ee7b
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: do not pass SchemaContext to ShardCommitCoordinator 03/41403/3
Robert Varga [Wed, 6 Jul 2016 15:33:20 +0000 (17:33 +0200)]
BUG-5280: do not pass SchemaContext to ShardCommitCoordinator

ShardCommitCoordinator already has a reference to the ShardDataTree,
there is no point in passing the same SchemaContext in.

Change-Id: I307a0b1b744a3a134807799effbf434a111ff54b
Signed-off-by: Robert Varga <>
7 years agoGen. Abstract*ModuleFactory with WORKING handleChangedClass() 50/40950/4
Michael Vorburger [Tue, 28 Jun 2016 15:15:26 +0000 (17:15 +0200)]
Gen. Abstract*ModuleFactory with WORKING handleChangedClass()

Bug: 2855
Change-Id: I243da5822265db3913f6b0afb2f9393f78b0c24c
Signed-off-by: Michael Vorburger <>
7 years agoMinor clean-up: rm .checkstyle (these files are on .gitignore) 59/40959/4
Michael Vorburger [Tue, 28 Jun 2016 17:53:21 +0000 (19:53 +0200)]
Minor clean-up: rm .checkstyle (these files are on .gitignore)

Change-Id: I2db9b9a67f9cb47062b9409749a386e6559628d4
Signed-off-by: Michael Vorburger <>
7 years agoForce install snapshot when follower log is ahead 35/41535/2
Tom Pantelis [Fri, 1 Jul 2016 04:25:17 +0000 (00:25 -0400)]
Force install snapshot when follower log is ahead

It's possible for a follower's log to actually be ahead of the leader's log.
Normally this doesn't happen in raft as a node cannot become leader if its
log is behind another's. However, the non-voting semantics deviate a bit
from raft. Only voting members participate in elections and can become
leader so it's possible for a non-voting follower to be ahead of the leader.
This can happen if persistence is disabled and all voting members are
restarted. In this case, the voting leader will start out with an empty log
however the non-voting followers still retain the previous data in memory.
On the first AppendEntries, the non-voting follower returns a successful
reply b/c the prevLogIndex sent by the leader is -1 and thus the integrity
checks pass. However the follower's returned lastLogIndex may be higher in
which case we want to reset the follower by installing a snapshot.
Therefore I added a check in AbstractLeader#handeAppendEntriesReply if
the reply lastLogIndex > leader's last index.

Since the initial AppendEntries is sent immediately by the leader,
normally the follower will reply and this change works. However if a
follower happens to be disconnected and doesn't reply for some time, the
leader can still progress with new commits. If the leader has enough
commits such that its lastIndex matches or exceeds the lagging
non-voting follower, this check doesn't work. In this case, the
follower's integrity checks will fail since the leader's prevLogTerm
will differ. On reply the leader will start decrementing the follower's
nextIndex in an attempt to find where the logs match. During this
process the leader may trim its log via replicatedToAllIndex in which
case the follower's nextIndex may no longer be in the leader's log and
the leader will install a snapshot.

However if other nodes are down and prevent the log trimming then the
follower's nextIndex may be in the log until it eventually decrements to
0. The follower's integrity checks will pass in this case since the
leader's prevLogIndex will be -1. The follower will then attempt to add
the leader's log entries to its log. It first loops the log entries in
the AppendEntries with the intent of skipping matching entries in its
log (ie index and term the same) and stopping when it finds an entry
that doesn;t exist or finds one whose term doesn't match, in which case
it removes the entries beginning at this index. However I found some
issue in this code. First it was calling get on the getReplicatedLog
which doesn't take into account that the index may be part of the prior
snaphot and not actually in the log. I changed this check to
isLogEntryPresent which takes into account the snapshot. Second, if it
hits a conflicting entry it tries to remove it from the log. However,
as before, it may be in the snapshot and not in the log in which case
nothing gets removed. To alleviate this, I modified removeFromAndPersist
to return a boolean - false meaning it didn't find the index. In this
case I changed it to send back a reply to force a snapshot.

I added several tests in a new class NonVotingFollowerIntegrationTest
that runs thru various scenarios to cover the cases described above.

While testing I ran into some orthoganl issues that I also fixed.

- if a leader has only non-voting followers, on replicate, it should
  immediately commit and apply to state as it does when there's no
  followers since it doesn't need consensus from non-voting followers.
  So I added a method anyVotingPeers to RaftActorContext to handle this

- When calculating the prevLogIndex and prevLogTerm for the
  AppendEntries message, it calls get on the getReplicatedLog
  which doesn't take into account that the index may be the snaphot
  index/term. Follower does this check prevLogIndex/prevLogTerm so
  the leader should as well.

Change-Id: I3f92fc0b92ddc6d02dc6cb0e56b444a7c61035d7
Signed-off-by: Tom Pantelis <>
7 years agoAdd CLI bundle to the startup archetype 49/41049/16
Rashmi Pujar [Wed, 29 Jun 2016 20:08:52 +0000 (16:08 -0400)]
Add CLI bundle to the startup archetype

Change-Id: I19ef17236a25cc84a9ff4b94a990d324386d9b19
Signed-off-by: Rashmi Pujar <>
7 years agoGen. Abstract*ModuleFactory handleChangedClass() with DependencyResolver 14/40514/5
Michael Vorburger [Sat, 18 Jun 2016 18:02:19 +0000 (20:02 +0200)]
Gen. Abstract*ModuleFactory handleChangedClass() with DependencyResolver

Bug: 2855
Change-Id: Ieb010d67983a4807bd1e5b55886ba0c4c3f13385
Signed-off-by: Michael Vorburger <>
7 years agoAdd option to enable/disable basic DCL and/or DTCL 72/41472/1
Ryan Goulding [Fri, 24 Jun 2016 15:50:00 +0000 (11:50 -0400)]
Add option to enable/disable basic DCL and/or DTCL

The cars stress test is a very appropriate place to measure the effects
of DCL and DTCL on a very long list.  This change adds a few RPC
implementations in order to do the following:

1) enable DCL
2) disable DCL
3) enable DTCL
4) disable DTCL

This change includes very basic DCL/DTCL implementations, which just log
a message at trace level (off by default but there for ensuring the
onData*Changed(...) method is actually called.

The existing clustering-test-app behavior doesn't change at all;  these
new RPC(s) do not need to be used, and the added Listener implementations
are not registered listeners by default.

Change-Id: I6fcec6cd8c0a082e815561e88b325a55022ad2af
Signed-off-by: Ryan Goulding <>
(cherry picked from commit 7a53dd074428ce5c4be767a51c509b1b8cf0f05e)

7 years agoBUG-5280: introduce request/response Envelope 50/41150/10
Robert Varga [Thu, 30 Jun 2016 09:57:38 +0000 (11:57 +0200)]
BUG-5280: introduce request/response Envelope

This is a follow-up patch to move sequence information from
request/response structure and making it part of an Envelope,
which is allocated by the SequencedQueue.

Change-Id: I341118850d9c5835bab0b491f59b95264f31e5ef
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: implement message queueing 61/39561/75
Robert Varga [Sat, 28 May 2016 23:27:24 +0000 (01:27 +0200)]
BUG-5280: implement message queueing

This patch implements the basic queueing and timeout retry mechanism
in ClientActorBehavior.

This implementation is not very efficient, as each send goes through
the actor's mailbox, but it gets the job done and is correct. It will
be optimized in a follow-up patch, which will refactor internal
workings so that SequencedQueue is fully thread-safe and correct with
regard to request enqueue, timeouts and retries.

Change-Id: I207a30877328dbdc08d42f76a0db55b5ae162de5
Signed-off-by: Robert Varga <>
7 years agoGenerate sal-binding-broker-impl-*-test-sources.jar 15/41315/2
Michael Vorburger [Tue, 5 Jul 2016 00:36:47 +0000 (02:36 +0200)]
Generate sal-binding-broker-impl-*-test-sources.jar

This is handy so that you can see the source of e.g.
AbstractDataBrokerTest in the IDE, just like other sources.  This did
not work before because of <type>test-jar.

Change-Id: I7f1e2516e326de3eb824a728146ef4287d8419f8
Signed-off-by: Michael Vorburger <>
7 years agoClear leaderId when election timeout occurs in non-voting follower 21/41321/2
Sai MarapaReddy [Wed, 29 Jun 2016 23:31:00 +0000 (16:31 -0700)]
Clear leaderId when election timeout occurs in non-voting follower

We need to enable election timeouts on non-voting follower and clear the
leaderId when it occurs to mimic the behavior when it goes to Candidate
on election timeout.

Signed-off-by: Sai MarapaReddy <>
Author: Sai MarapaReddy <>
Change-Id: I8b3316e14315a47e09b48af2e3ea16a391ec6c5a
Signed-off-by: Tom Pantelis <>
7 years agoAdd ServerConfigPayload to InstallSnapshot message 20/41320/3
Tom Pantelis [Wed, 29 Jun 2016 06:09:49 +0000 (02:09 -0400)]
Add ServerConfigPayload to InstallSnapshot message

When the leader installs a snapshot on a follower, it needs to include the
server config info as well. Otherwise if a server config change occurred
while a follower was down, it won't get the updated server config info
and will be out of sync with the rest of the cluster which causes other

Change-Id: Ic290ed162bf9fdf6b9fe55986ea0c9c9e83b29a9
Signed-off-by: Tom Pantelis <>
(cherry picked from commit b8e21016b85e98c31d866de7b6db51691596c9f4)

7 years agoEliminate dead letters message when there's no sender 41/41241/2
Tom Pantelis [Thu, 23 Jun 2016 18:15:17 +0000 (14:15 -0400)]
Eliminate dead letters message when there's no sender

When sending a message to close a DTCL or DCL registration, if the caller
isn't interested in the reply, it passes ActorRef.noSender() (ie null). Internally
akka translates this to the dead letters actor so you see log messages
of the form "Message [...CloseDataTreeChangeListenerRegistrationReply]
from Actor[...] to Actor[akka://opendaylight-cluster-data/deadLetters] was not
delivered. [1] dead letters encountered.".

To alleviate this we should check if the sender is the dead letters actor
before sending the reply.

Change-Id: Idfaf280acf720cf5727393262638a7783c1af539
Signed-off-by: Tom Pantelis <>
7 years agoMove GlobalBundleScanningSchemaServiceImpl to its own bundle 58/40458/4
Tom Pantelis [Thu, 16 Jun 2016 01:04:02 +0000 (21:04 -0400)]
Move GlobalBundleScanningSchemaServiceImpl to its own bundle

Moved the GlobalBundleScanningSchemaServiceImpl and the associated
BundleActivator, SchemaServiceActivator, from sal-dom-broker to a new
bundle sal-schema-service.

A couple reasons for this. One is to break the circular service imports
between sal-dom-broker and sal-distributed-datastore, where
sal-distributed-datastore imports the SchemaService from sal-dom-broker
and sal-dom-broker imports the DOMDataBroker from
sal-distributed-datastore. The result of this was that if the
sal-dom-broker blueprint container was restarted, it would also cause
the sal-distributed-datastore container to restart, which isn't

The other reason is that apps can register a SchemaContextListener as an
OSGi service which is picked up by the
GlobalBundleScanningSchemaServiceImpl. In terms of service usage this
makes sal-dom-broker a dependency of the app bundle so if the app
container restarts, it also restarts sal-dom-broker,
sal-distributed-datastore etc which isn't desirable.

So moving the GlobalBundleScanningSchemaServiceImpl to its own bundle
alleviates both issues.

Change-Id: I75d1009f6bfc1d80a19a61050703a1ca7e049575
Signed-off-by: Tom Pantelis <>
7 years agoFix intermittent failure in ClusterAdminRpcServiceTest 42/41242/3
Tom Pantelis [Sat, 2 Jul 2016 06:09:34 +0000 (02:09 -0400)]
Fix intermittent failure in ClusterAdminRpcServiceTest

Time elapsed: 8.187 sec  <<< FAILURE!
java.lang.AssertionError: Leader Id
Expected: (a string containing "member-2" or a string containing
     but: was "member-1-shard-cars-config_testRemoveShardLeaderReplica"
at org.hamcrest.MatcherAssert.assertThat(
at org.junit.Assert.assertThat(

member3 tried to become leader but hadn't gotten MemberUp for member2
yet so it didn't have its address when it sent out RequestVote. The
verification of new leader timed out before it coild try again. The call
to waitForMembersUp on line 397 should be for replica3 and not replica2.

Change-Id: I3a714c91ba974b16b2c310027b09f9658915a639
Signed-off-by: Tom Pantelis <>
7 years agoBUG-6140: controll karaf zip and tar.gz creation 02/41202/2
Michal Rehak [Fri, 1 Jul 2016 10:02:16 +0000 (12:02 +0200)]
BUG-6140: controll karaf zip and tar.gz creation

    - added 2 new properties in order to easy switch configuration
      via cli or child-pom

Change-Id: I617ac958e12097260264880e3c9f45fa1e1428a1
Signed-off-by: Michal Rehak <>
7 years agoAdd maven-metadata-local.xml to .gitignore 41/41141/2
Tomas Cere [Thu, 30 Jun 2016 12:36:54 +0000 (14:36 +0200)]
Add maven-metadata-local.xml to .gitignore

Change-Id: I1350644bf1e58462564eaa88c4ac6ab34b72cc3f
Signed-off-by: Tomas Cere <>
7 years agoAdd blueprint wiring to opendaylight-archetype 61/41161/7
Alexis de Talhouët [Thu, 30 Jun 2016 18:29:51 +0000 (14:29 -0400)]
Add blueprint wiring to opendaylight-archetype

Change-Id: I0b219e8da4a1e58d6254c1dff993e8719aa14fd5
Signed-off-by: Alexis de Talhouët <>
7 years agoBug 6106: Prevent flood of quarantine messages 33/41033/2
Tom Pantelis [Sat, 25 Jun 2016 02:04:02 +0000 (22:04 -0400)]
Bug 6106: Prevent flood of quarantine messages

Added a "quarantined" flag to the QuarantinedMonitorActor so it only
prints the warning and attempts to restart the karaf container once
(which is invoked indirectly via the caller's Effect callback).

Change-Id: I0a57af729280abded93d1b1a575df1672e52032e
Signed-off-by: Tom Pantelis <>
(cherry picked from commit 3066f54d6d2c6206fa5fabc69a795993c68d2d77)

7 years agoFix intermittent test failures in CDS 28/41028/3
Tom Pantelis [Wed, 29 Jun 2016 07:04:47 +0000 (03:04 -0400)]
Fix intermittent test failures in CDS

Seeing intermittent failures on jenkins, eg

Failed tests:
Missing messages of type class

Sometimes the initial AppendEntries messages go to dead letters,
probably b/c the follower actors haven't been fully created/initialized by akka.
So added retries as a workaround.

Failed tests:
Rpc failed with error: RpcError [message=Failed to change member voting
states for shard cars: Shard
currently has no leader. Try again later., severity=ERROR,
errorType=RPC, tag=operation-failed, applicationTag=null, info=null,

Needs to ensure node3's datastore shards are ready with leaders.

Change-Id: I5031c2a7b3e6eeddbf80b8eb346492acd11d664c
Signed-off-by: Tom Pantelis <>
7 years agoFix karaf regression introduced in Gerrit 40775 89/40889/2
Lorand Jakab [Mon, 27 Jun 2016 19:16:33 +0000 (14:16 -0500)]
Fix karaf regression introduced in Gerrit 40775

This should still allow for a Java installation in a folder containing

Change-Id: I8d4d51e39bde6d2b237a755ff3c82a045d5e2629
Signed-off-by: Lorand Jakab <>
7 years agoFix serialVersionUID 35/40735/4
Robert Varga [Wed, 22 Jun 2016 15:04:53 +0000 (17:04 +0200)]
Fix serialVersionUID

This fixes serialVersionUID not being final. Since it was not final,
as per Serializable contract, it had no effect. To retain compatibility
we must use a generated value.

Also remove use of a deprecated method.

Change-Id: I720dcd2613481eb474072ef29e7190cb0f5a28b6
Signed-off-by: Robert Varga <>
7 years agoDisable the version of Xalan bundled in Karaf 3.0.7 64/40864/2
Stephen Kitt [Mon, 27 Jun 2016 11:39:34 +0000 (13:39 +0200)]
Disable the version of Xalan bundled in Karaf 3.0.7

This patch extends the Xalan clean-up to disable the 2.7.2_3
ServiceMix bundle included in Karaf 3.0.7. It works with both 3.0.6
and 3.0.7.

Change-Id: I555266efb5c3437830024303083ba1dc982fbcb7
Signed-off-by: Stephen Kitt <>
7 years agoDeprecate TransactionStatus 35/39735/2
Michael Vorburger [Wed, 1 Jun 2016 21:00:36 +0000 (23:00 +0200)]
Deprecate TransactionStatus

just because all other APIs where this enum is used are already marked
@Deprecated, so it would appear that this one was simply forgotten to be
marked as such.

Change-Id: Id8448d60a63d4a72a75ae0d25ebe7ff51db865c8
Signed-off-by: Michael Vorburger <>
7 years agoChange count type in the cars model 36/40836/4
Ryan Goulding [Fri, 24 Jun 2016 15:57:00 +0000 (11:57 -0400)]
Change count type in the cars model

The count type is changed from uint16 to uint32.  For some performance/stress
tests, it is desirable to issue 1E7 transactions to provide an adequate sample
size.  Prior to this change, it was impossible to issue a million transactions
without either invoking the RPC several times or using count=0 and stopping
based on log messages.  This makes perf testing easier.

Change-Id: Icf125e45bd85e14df6ed5ad91ddad92a8dd2151b
Signed-off-by: Ryan Goulding <>
7 years agoAdd a description to "rate" in the cars model 35/40835/3
Ryan Goulding [Fri, 24 Jun 2016 15:54:20 +0000 (11:54 -0400)]
Add a description to "rate" in the cars model

While using this model for some performance testing, I realized I had no idea
what rate meant initially.  This change adds an appropriate description to the
rate leaf.

Change-Id: Idfd613f91e00de912784da55076ec7b13812fdd2
Signed-off-by: Ryan Goulding <>
7 years agoEnable Java installation in folder with spaces 75/40775/3
danipeon [Thu, 23 Jun 2016 15:04:02 +0000 (17:04 +0200)]
Enable Java installation in folder with spaces

It has been quoted the variable $JAVA in the karaf script in order
to allow that the Java installation is in a folder which name
contains any space.

Change-Id: I6305204c872552c4e52ec7000720c67340cf0b88
Signed-off-by: danipeon <>
7 years agoAdd "static-reference" blueprint extension 21/40421/5
Tom Pantelis [Wed, 22 Jun 2016 17:11:50 +0000 (13:11 -0400)]
Add "static-reference" blueprint extension

Added a blueprint extension, "static-reference", that obtains an OSGi
service and returns the actual instance. This differs from the standard
"reference" element that returns a dynamic proxy whose underlying
service instance can come and go. This is useful especially in cases
where the service exists for the life of the karaf container and you
don't need/want the overhead of the proxy.

Change-Id: I4cbcc7e2b5a85b0a22e50e12f3946d29bfb36c7d
Signed-off-by: Tom Pantelis <>
7 years agoInject BindingAwareBroker as it is now provided by OSGi 78/40778/1
Alexis de Talhouët [Thu, 23 Jun 2016 15:24:52 +0000 (11:24 -0400)]
Inject BindingAwareBroker as it is now provided by OSGi

Since the wiring is done via blueprint, BindingAwareBroker is not
registered using blueprint, thus it is no longer provided by CSS.

Change-Id: I87c4d21d51b243b9d9dcd4178556a98390ebc6ec
Signed-off-by: Alexis de Talhouët <>
7 years agoBUG-5280: move AbstractDataTreeModificationCursor 40/39840/38
Robert Varga [Fri, 3 Jun 2016 12:28:42 +0000 (14:28 +0200)]
BUG-5280: move AbstractDataTreeModificationCursor

AbstractDataTreeModificationCursor functionality is useful for wide
range of users, move it to sal-clustering-commons.

Also eliminate the explicit stack, because YangInstanceIdentifier
already has O(1) methods to maintain a logical stack.

Change-Id: Ia0f8d24f32afd67c059e72cc967949f4c609fd7c
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: add BackendInfo/BackendInfoResolver 58/39758/44
Robert Varga [Thu, 2 Jun 2016 09:20:51 +0000 (11:20 +0200)]
BUG-5280: add BackendInfo/BackendInfoResolver

Client actor needs to be able to resolve a particular backend
so it can implement retry logic with request adaptation. Add
the baseline class and an implementation for current sharding.

Change-Id: Ic7b679b1cadaff130b3a266606fe48cad5c20614
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: introduce cookie in LocalHistoryIdentifier 07/39607/45
Robert Varga [Mon, 30 May 2016 14:19:12 +0000 (16:19 +0200)]
BUG-5280: introduce cookie in LocalHistoryIdentifier

Frontend transactions can map onto multiple backend shards,
hence the current form is not sufficient to identify responses.

Introduce anopaque cookie, which will be assigned to frontend
subtransactions and hence provide identification.

Change-Id: I442dcfa1a6f04330c608f3328a7e10c6aeb90bb0
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: introduce base Transaction request/success 06/39506/59
Robert Varga [Thu, 26 May 2016 23:13:56 +0000 (01:13 +0200)]
BUG-5280: introduce base Transaction request/success

Change-Id: I23b83c3912975497f6ab2fac73451f51e613bc2e
Signed-off-by: Robert Varga <>
7 years agoBUG-865: remove reference to URLSchemaContextResolver 98/40698/2
Robert Varga [Wed, 22 Jun 2016 12:44:33 +0000 (14:44 +0200)]
BUG-865: remove reference to URLSchemaContextResolver

This has been superseded by YangTextSchemaContextResolver.

Change-Id: I40559fbd79ff7aff59585b60d65fd6e53da695c6
Signed-off-by: Robert Varga <>
7 years agoAdd "specific-reference-list" blueprint extension 67/40267/4
Tom Pantelis [Mon, 13 Jun 2016 22:37:58 +0000 (18:37 -0400)]
Add "specific-reference-list" blueprint extension

Added a blueprint extension, "specific-reference-list", that obtains a specific
list of service instances from the OSGi registry for a given interface. The
specific list is learned by first extracting the list of expected service types
by inspecting RESOLVED bundles for a resource file under META-INF/services with
the same name as the given interface. The type(s) listed in the resource file
must match the "type" property of the advertised service(s). In this manner, an
app bundle announces the service type(s) that it will advertise so that the
extension knows which services to expect up front. Once all the expected services
are obtained, the container is notified that all dependencies are satisfied.

This new extension will initially be used by the bgpcep project.

Change-Id: I3bc6a72134b33c744fbb48fd645dd3a0ca54673d
Signed-off-by: Tom Pantelis <>
7 years agoBUG-5903: do not rely on primary info on failure 27/40627/2
Robert Varga [Tue, 21 Jun 2016 16:09:03 +0000 (18:09 +0200)]
BUG-5903: do not rely on primary info on failure

This makes sure we check for failure before touching the result,
which is null if a failure occurs.

In order to keep disagnosti information we add a reference
to the message class being broadcast.

Change-Id: I26ab31a45916d11b61b990020bed89ae87233b14
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: use a lambda for createLocalHistory()/close() 74/39574/38
Robert Varga [Sun, 29 May 2016 21:34:14 +0000 (23:34 +0200)]
BUG-5280: use a lambda for createLocalHistory()/close()

These are internal commands, which can be efficiently implemented
using a simple delayed execution primitive.

Introduce ClientActorContext#executeInActor(), which will wrap
a specialized subclass of Runnable and send it to the actor.

This can be used to dispatch lambdas to methods, reducing the need
for specialized messages and instanceof checks.

Change-Id: Id5cd388657a274d551892a6c943b062d70c7bea7
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: introduce the notion of client actor time 72/39572/39
Robert Varga [Sun, 29 May 2016 19:35:08 +0000 (21:35 +0200)]
BUG-5280: introduce the notion of client actor time

Time is exposed as a Ticker, with the implementation returning
the system ticker.

Add a few basic tests and testin infrastructure to control
the Ticker's passage of time.

Change-Id: I2bb1a8d9555979d38434602d68d48aeef66ae78a
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: define RetiredGenerationException 40/39540/47
Robert Varga [Fri, 27 May 2016 15:24:20 +0000 (17:24 +0200)]
BUG-5280: define RetiredGenerationException

This defines the error reported by the backend whenever it sees
a request coming from an outdated client generation. The client
behavior handles these failures by invoking an upcall to the subclass
and initiate shutdown.

Change-Id: Iea1e04e3754fdc09fbdd9c6dc0d420a05145791c
Signed-off-by: Robert Varga <>
7 years agoImprove readability of Toaster code (incl. Java 8 lambda, static import) 32/39732/5
Michael Vorburger [Wed, 1 Jun 2016 20:14:14 +0000 (22:14 +0200)]
Improve readability of Toaster code (incl. Java 8 lambda, static import)

and some very minor unrelated pom.xml clean-up

Change-Id: I47fc27cca633972a7a678c0a0a2852c4ad799d65
Signed-off-by: Michael Vorburger <>
7 years ago.gitignore .factorypath created by m2e-apt 31/39731/3
Michael Vorburger [Wed, 1 Jun 2016 20:07:59 +0000 (22:07 +0200)]
.gitignore .factorypath created by m2e-apt now bundles, which creates .factorypath files
all over the place.

Change-Id: Ib9ddd1302fdf8296638dd0f14204e27992bd3d5f
Signed-off-by: Michael Vorburger <>
7 years agoComment (only) in controller:checkstyle to document next steps 00/39800/2
Michael Vorburger [Thu, 2 Jun 2016 21:35:10 +0000 (23:35 +0200)]
Comment (only) in controller:checkstyle to document next steps

Change-Id: Ia7426febf2bb7503460d40f1f4710bcaabb5a6b3
Signed-off-by: Michael Vorburger <>
7 years agoDeprecate netty config modules 82/38282/6
Tom Pantelis [Wed, 20 Apr 2016 00:01:00 +0000 (20:01 -0400)]
Deprecate netty config modules

Marked the md-sal dom/binding config yang modules, 01-md-sal.xml and
associated Module classes as deprecated.

Change-Id: I5c2b531ac489b3ce06e54078f28ad0ea76a35670
Signed-off-by: Tom Pantelis <>
7 years agoDeprecate md-sal config modules 81/38281/6
Tom Pantelis [Tue, 19 Apr 2016 09:00:39 +0000 (05:00 -0400)]
Deprecate md-sal config modules

Marked the md-sal dom/binding config yang modules, 01-md-sal.xml and
associated Module classes as deprecated.

Change-Id: Icbc24a0622f8b83173f656f9fa11003f270eaef3
Signed-off-by: Tom Pantelis <>
7 years agoEnable netty config modules to restart when blueprint container restarts 80/38280/6
Tom Pantelis [Tue, 19 Apr 2016 05:09:39 +0000 (01:09 -0400)]
Enable netty config modules to restart when blueprint container restarts

Added the necessary service properties such that when the blueprint
container is restarted on config change the associated config system
Module instances are recreated/restarted. This for backwards compatibility
for existing CSS modules that inject the netty CSS modules.

Change-Id: Icb12968805d8760cb03d3eea1e8ceda5ec1de2f5
Signed-off-by: Tom Pantelis <>
7 years agoRestart config Modules when blueprint container restarted 79/38279/7
Tom Pantelis [Fri, 15 Apr 2016 20:50:10 +0000 (16:50 -0400)]
Restart config Modules when blueprint container restarted

Modified the BlueprintContainerRestartServiceImpl to recreate/restart
associated config system Modules when a blueprint container is
restarted. A config Module is associated to a service instance that is
advertised via blueprint via adding certain service properties that
identifies the module namespace, module name and instance name. When
these properties are encountered for a service while traversing the
service usage tree, the module info is queued. After all blueprint
containers are restarted, the config Modules are recreated/restarted.

Change-Id: Ia16830620bfb54896ebf54d0542d31a51d4b067a
Signed-off-by: Tom Pantelis <>
7 years agoBUG-5280: introduce Request/Response and related concepts 79/39479/48
Robert Varga [Thu, 26 May 2016 11:36:35 +0000 (13:36 +0200)]
BUG-5280: introduce Request/Response and related concepts

This adds a versioned message concept and Request/Response concepts
built on top of it. Serialization uses the serializable proxy pattern,
with one proxy class per ABI version.

For ActorRefs we rely on the fact that serialization of these
messages should only ever occur in the context of JavaSerializer,
so we can use its #currentSystem() and perform ActorRef serialization
without having to go through writeObject().

Change-Id: Ic2701646bf3fc34c0d8d1dea278bbf63324a6786
Signed-off-by: Robert Varga <>
7 years agoBUG-5930: introduce PayloadVersion 83/39383/37
Robert Varga [Tue, 24 May 2016 22:14:29 +0000 (00:14 +0200)]
BUG-5930: introduce PayloadVersion

This patch defines the concept of a PayloadVersion, which governs
state flooding from leader to followers.

Change-Id: I412fbe89c75f4a66bb9e780bfdf0d3153a8b5366
Signed-off-by: Robert Varga <>
7 years agoRemove snapshot after startup and fix related bug 76/39976/5
Tom Pantelis [Fri, 3 Jun 2016 20:04:28 +0000 (16:04 -0400)]
Remove snapshot after startup and fix related bug

Fixed an issue in the follower out-of-sync integrity checking where is
needs to take into account that the previous index may be in the
snapshot. A similar issue was seen with other inegrity checks.

These issues were indirectly related to the snapshot after startup that
was introduced in Be. I think this snapshot is unsafe b/c the
replicatedToAllIndex hasn't been determined yet which I think may cause
other issues with the trimming after snapshot completion, as the logic
takes replicatedToAllIndex into account. And there may be other lurking
bugs. I thinks it's safer to let the normal snapshot logic handle it.

The reason for the snapshot after startup was to avoid having to recover
the same journal entries again on restart that were just recovered. However
in reality, in production, servers aren't commonly restarted and
typically go weeks/months in between restarts. By the time of the next
restart there would likely have been another snapshot and an arbitrary amount
of  new journal entries to recover so it really doesn't add much value.

Change-Id: I4f8197911f9258804c470b3608f669fca707a425
Signed-off-by: Tom Pantelis <>
7 years agoBUG-865: remove use of QName.cachedReference() 42/40342/2
Robert Varga [Wed, 15 Jun 2016 00:30:37 +0000 (02:30 +0200)]
BUG-865: remove use of QName.cachedReference()

QName.intern() is the replacement, use that instead.

Change-Id: Iec80feb66561575491a437dbd06d2709a5e7183d
Signed-off-by: Robert Varga <>
7 years agoBUG-5932: Remove unused OpenFlow configuration parameters 67/39367/6
Robert Varga [Tue, 24 May 2016 17:06:50 +0000 (19:06 +0200)]
BUG-5932: Remove unused OpenFlow configuration parameters

OpenFlowPlugin is hosting its own configuration, these knobs are
no longer needed.

Change-Id: Ib9c9505075ae17a8540219e7b2612494f460366c
Signed-off-by: Robert Varga <>
7 years agoBUG-865: remove use of deprecated model instances 10/39910/5
Robert Varga [Mon, 6 Jun 2016 23:11:46 +0000 (01:11 +0200)]
BUG-865: remove use of deprecated model instances

Type checking should be done via DerivedTypes test methods.

Change-Id: Iacefe651997ea464082e3286de8963864b92cc12
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: remove WritableObjects 25/40325/2
Robert Varga [Tue, 14 Jun 2016 21:28:03 +0000 (23:28 +0200)]
BUG-5280: remove WritableObjects

The concept has been merged into yangtools, consume it from there. Also
shorten the use of Identifier & WritableObject to WritableIdentifier which
is also a yangtools concept.

Change-Id: Iaaffd59b2c5b193447540487df6aabdd29f491d1
Signed-off-by: Robert Varga <>
7 years agoBUG-5626: make CloseTransactionChain implement Identifiable 70/39470/33
Robert Varga [Wed, 25 May 2016 16:26:09 +0000 (18:26 +0200)]
BUG-5626: make CloseTransactionChain implement Identifiable

This message is really tied to a particular LocalHistoryIdentifier,
express that by implementing Identifiable<LocalHistoryIdentifier>.

Change-Id: Ibc2c64656c55106b36873b168d348e2a1304ea74
Signed-off-by: Robert Varga <>
7 years agoBUG-5930: introduce ABIVersion 24/39224/45
Robert Varga [Sun, 22 May 2016 11:35:40 +0000 (13:35 +0200)]
BUG-5930: introduce ABIVersion

This patch introduces the concept of ABI version in the client API.
The concept will serve to guide frontend/backend interactions so that
version negotiation cal ne implemented and messages are sent using
a compatible serialization format.

Change-Id: I90f9fa70c745c62350960ce151cd116e14b5208a
Signed-off-by: Robert Varga <>
7 years agoAnticipate future fix for missing .gitignore in archetypes' projects 06/39106/3
Michael Vorburger [Thu, 19 May 2016 12:13:59 +0000 (14:13 +0200)]
Anticipate future fix for missing .gitignore in archetypes' projects

see (or

BTW: The current solution in
doesn't seem to work (for me; I don't get a .gitignore ..). At least
with this it will work when we'll upgrade from current
maven-resources-plugin 2.7 to 3.0 (not yet released) some time in the

PS: The removed /config/.gitignore is an unrelated minor clean.

Change-Id: I3d7d8708eb128d975879094f3775439e11721668
Signed-off-by: Michael Vorburger <>
7 years agoBug 5913: Fix ISE in DefaultShardDataChangeListenerPublisher 06/40306/2
Tom Pantelis [Tue, 14 Jun 2016 14:18:30 +0000 (10:18 -0400)]
Bug 5913: Fix ISE in DefaultShardDataChangeListenerPublisher

The publishChanges method is only called from the
ShardDataTreeNotificationPublisherActor which is single-threaded so
publishChanges can't be called concurrently. However the
DefaultShardDataChangeListenerPublisher instance is passed via
the PublishNotifications message so the Stopwatch isn't thread safe
wrt thread visibility of its internal state. Therefore it's possible
the change in state done on thread 1 isn't immediately visible to
a subsequent thread. To alleviate this, I moved the Stopwatch and the
elapsed time check to the ShardDataTreeNotificationPublisherActor.

Change-Id: I046e7e92aa96eec01d5a355c8431ef797c534ead
Signed-off-by: Tom Pantelis <>
7 years agoBUG-5280: add CommitTransactionPayload 83/39283/46
Robert Varga [Mon, 23 May 2016 18:10:01 +0000 (20:10 +0200)]
BUG-5280: add CommitTransactionPayload

This adds the base payload, which is to be used for propagating
transaction effects instead of DataTreeCandidatePayload. Also adds
the abort case counterpart.

Change-Id: I621e0be4f26509fae9f04e230c6a7e145938d7e6
Signed-off-by: Robert Varga <>
7 years agoMake akka-testkit a test dependency 81/40281/2
Robert Varga [Tue, 14 Jun 2016 08:36:20 +0000 (10:36 +0200)]
Make akka-testkit a test dependency

This should only ever be used in tests, hence scope=test.

Change-Id: I62795d61cc979b2e852ecf676d76e43845004ce2
Signed-off-by: Robert Varga <>
7 years agoGuard against duplicate log indexes 75/39975/4
Tom Pantelis [Fri, 3 Jun 2016 15:59:31 +0000 (11:59 -0400)]
Guard against duplicate log indexes

We saw an issue where a duplicate log index was added to the journal.
The duplicates were contiguous. It is unclear at this point how it
happened but we should guard against it so I added a check to ensure the
new index > the last index.

Change-Id: I5acc0fa5b4fe7f4352fc7935e7262834894878f3
Signed-off-by: Tom Pantelis <>
7 years agoAdd voting state to shard mbean FollowerInfo 73/40173/2
Tom Pantelis [Fri, 10 Jun 2016 02:25:05 +0000 (22:25 -0400)]
Add voting state to shard mbean FollowerInfo

The shard mbean displays the peer voting states map but it's also useful
to see the voting state in the leader's FollowerInfo.

Also fixed an NPE when JMX accesses the peerAddresses when a peer's
address is null. We use guava's Map.Joiner to output the map but it
throws an NPE for a null entry vlaue. I chnaged RaftActor to put "" in
the map if null.

Change-Id: Ibe9f8ec1bb01231c1aa960e104da58c0ce72d9b6
Signed-off-by: Tom Pantelis <>
7 years agoStop building test-jar for sal-dummy-distributed-datastore 75/40175/2
Stephen Kitt [Fri, 10 Jun 2016 15:48:54 +0000 (17:48 +0200)]
Stop building test-jar for sal-dummy-distributed-datastore

Newer versions of maven-jar-plugin no longer support multiple outputs
with the same classifier, so the dual "jar" and "test-jar" goals here
cause an error. Since test-jar ends up being empty, and it isn't used
anywhere else, this patch simply drops the maven-jar-plugin
configuration so it only builds a standard JAR (and the shaded

Change-Id: Iadc3def3df2f4ff1e9ac647c538b9fe2c4001ca4
Signed-off-by: Stephen Kitt <>
7 years agoCreate DatastoreSnapshotRestore instance via blueprint 13/36913/13
Tom Pantelis [Tue, 29 Mar 2016 22:11:18 +0000 (18:11 -0400)]
Create DatastoreSnapshotRestore instance via blueprint

The DatastoreSnapshotRestore instance was created via a bundle Activator
in order to make it available to both data store instances w/o having to
create a config yang for it and having it advertised as a service and
injected into the data store Modules.

Now that the data store instances are created via blueprint, we no
longer need the Activator and the DatastoreSnapshotRestore instance is now
created via blueprint.

Change-Id: I8299823787fff6b03934e2b0069d77b0d9981d81
Signed-off-by: Tom Pantelis <>
7 years agoDebug logging in AbstractLeader is too chatty 50/40050/2
Tom Pantelis [Wed, 8 Jun 2016 07:30:33 +0000 (03:30 -0400)]
Debug logging in AbstractLeader is too chatty

The additional debug logging added with makes it too chatty with
heartbeats when nothing changed which will roll-over log files much more
quickly. Changed a debug to trace.

Change-Id: I4c204c6d0734d6ac8655380adcc2df09cb2890ae
Signed-off-by: Tom Pantelis <>
7 years agoBUG-5280: move DataTreeCandidate serialization to its own class 67/39267/32
Robert Varga [Mon, 23 May 2016 14:44:35 +0000 (16:44 +0200)]
BUG-5280: move DataTreeCandidate serialization to its own class

This is a useful utility, which can be reused across multiple objects.
Split it out into its own class.

Change-Id: Ib21abf0ae42e3f70f44b3214039c0f26464bbc3e
Signed-off-by: Robert Varga <>
7 years agoRemove CSS-related files from the clustering-test-app 36/38336/10
Tom Pantelis [Tue, 3 May 2016 06:05:26 +0000 (02:05 -0400)]
Remove CSS-related files from the clustering-test-app

The clustering-test-app is wired with blueprint and, since it's a
sample/test app, it doesn't need to maintain backwards compatibility with
CSS so remove the CSS-related files.

Change-Id: I0f186d8f143d171a1b6f55f36ce5ab74b14fa8cf
Signed-off-by: Tom Pantelis <>
7 years agoBUG-5280: switch transaction IDs from String to TransactionIdentifier 90/38990/47
Robert Varga [Tue, 17 May 2016 11:11:59 +0000 (13:11 +0200)]
BUG-5280: switch transaction IDs from String to TransactionIdentifier

This patch switches primary frontend messages to use TransactionIdentifier
instead of plain Strings.

Change-Id: Ib04a2e4882dfcc43eea5369bf162889fd7ef5472
Signed-off-by: Robert Varga <>
7 years agoRemove CSS-related files from the toaster 35/38335/9
Tom Pantelis [Tue, 3 May 2016 04:43:53 +0000 (00:43 -0400)]
Remove CSS-related files from the toaster

The toaster is wired with blueprint and, since it's a sample app,
it doesn't need to maintain backwards compatibility with CSS so remove
the CSS-related files.

Change-Id: I4b99933cec6188f3eb628eedffe20ce198ed1ab5
Signed-off-by: Tom Pantelis <>
7 years agoWrite failed node data on recovery to a file 87/36987/6
Tom Pantelis [Thu, 31 Mar 2016 21:52:17 +0000 (17:52 -0400)]
Write failed node data on recovery to a file

If a snapshot or journal batch fails schema validation on recovery, it's
helpful for troubleshooting to see the data so I added code to write the
failed node or modification to a file under the data directory.

Change-Id: I054798ae589837a6d4f6f511a22f0b478b6995bf
Signed-off-by: Tom Pantelis <>
7 years agoBUG 5932 - Remove NETCONF property 38/40038/4
Jakub Morvay [Wed, 8 Jun 2016 13:42:46 +0000 (15:42 +0200)]
BUG 5932 - Remove NETCONF property

Remove property from controller
etc/ file. It is netconf's project responsibility to
manage its own properties.

Needs to be merged after

Change-Id: Ib4d882c911682cc8a6844511c935f89aeddbced6
Signed-off-by: Jakub Morvay <>
7 years agoWait for RPCService registered in RpcServiceMetadata 71/39971/2
Tom Pantelis [Tue, 7 Jun 2016 18:04:50 +0000 (14:04 -0400)]
Wait for RPCService registered in RpcServiceMetadata

When obtaining an RpcService via the RpcProviderRegistry, the returned
instance is actually a proxy and the underlying DOM service instance may
not be registered yet. So if the caller tries to invoke an RPC it will
fail due to no implementation available. This is seen with the
ToasterTest with the switch to blueprint.

To alleviate I modified the RpcServiceMetadata to wait (asycnhronously)
for the underlying DOM RPC service implementation by registering a
DOMRpcAvailabilityListener with the DOMRpcService. In the callback, once
one of the RPCs is seen then it notifies the blueprint container that
its dependencies are satisfied so it can proceed.

Change-Id: I9f35afdd69ad069654a895239654a2ddc1ce1ee0
Signed-off-by: Tom Pantelis <>
7 years agoBug 6030 - "karaf" script invokes /bin/sh but requires /bin/bash functions 71/40071/2
Alexis de Talhouët [Wed, 8 Jun 2016 21:05:39 +0000 (17:05 -0400)]
Bug 6030 - "karaf" script invokes /bin/sh but requires /bin/bash functions

The bin/karaf script uses the "local" command which is a shell builtin of bash
and similar shells, but is not required for POSIX-compliance in sh.

On most flavors of linux, this resolves to bash or dash which probably runs in
a restricted environment after checking to see that its $0 is sh. But on Solaris's
/bin/sh is actually ksh93 for backwards compatibility.

Change-Id: Ifdd0e9fe798e881df01e7d2b586bc7e7142c0730
Signed-off-by: Alexis de Talhouët <>
7 years agoBUG-5280: do not use CompositeModification in Shard 25/39125/26
Robert Varga [Thu, 19 May 2016 17:10:17 +0000 (19:10 +0200)]
BUG-5280: do not use CompositeModification in Shard

The only production implementation of CompositeModification is
BatchedModifications. That carries the transaction identifier,
which will make it easier to retain proper names. It is also
needed for making the transaction IDs type-safe.

Change-Id: Icc49e6e13107a079db098a065e85791177db8cf0
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: Remove PeristentMessages 22/39122/28
Robert Varga [Thu, 19 May 2016 16:38:28 +0000 (18:38 +0200)]
BUG-5280: Remove PeristentMessages

This class is not used by any live code, remove it along with
the previously-deprecated codepaths.

Change-Id: Iaffc428a15c3cb2822d1465411e84e1d12994e2e
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: remove support for talking to pre-Boron clients 19/39119/28
Robert Varga [Thu, 19 May 2016 15:31:22 +0000 (17:31 +0200)]
BUG-5280: remove support for talking to pre-Boron clients

Both transaction chains and transaction identifiers are being changed to
structured data. Unfortunately there is no way to reliably map string
identifiers from versions prior to Boron in a consistent manner.

Pre-Boron messages do not have a concept of a frontend identifier nor its
generation. Implementations are assigning them in a non-deterministic
order and rely on timestamps to disambiguate between generations.

Since Shard-internal state keeping and replication logic will require
these concepts, this patch marks a clean break in compatibility. This
compatibility is only needed in mixed-version clusters, which have not
been validated to work and even if the data store works, it cannot
cope with model mismatches expected from differing versions.

Change-Id: I168fa0a98be10aebd680ce3323c458aad7f15865
Signed-off-by: Robert Varga <>
7 years agoBUG-5280: switch transactionIdentifier 62/38962/34
Robert Varga [Tue, 17 May 2016 08:29:38 +0000 (10:29 +0200)]
BUG-5280: switch transactionIdentifier

This eliminates datastore-internal TransactionIdentifier in favor of the
concept one, which is structured. Since the structured identifier also
includes LocalHistoryIdentifier, this eliminates also ChainedTransactionIdentifier.

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