controller.git
3 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
spaces.

Change-Id: I8d4d51e39bde6d2b237a755ff3c82a045d5e2629
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <skitt@redhat.com>
3 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 <vorburger@redhat.com>
3 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 <ryandgoulding@gmail.com>
3 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 <ryandgoulding@gmail.com>
3 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 <daniel.peon.quiros@ericsson.com>
3 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 <tpanteli@brocade.com>
3 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 <adetalhouet@inocybe.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <tpanteli@brocade.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <vorburger@redhat.com>
3 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

https://github.com/vorburger/opendaylight-eclipse-setup now bundles
https://github.com/jbosstools/m2e-apt, which creates .factorypath files
all over the place.

Change-Id: Ib9ddd1302fdf8296638dd0f14204e27992bd3d5f
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 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 <vorburger@redhat.com>
3 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 <tpanteli@brocade.com>
3 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 <tpanteli@brocade.com>
3 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 <tpanteli@brocade.com>
3 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 <tpanteli@brocade.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <tpanteli@brocade.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 https://issues.apache.org/jira/browse/MRESOURCES-190 (or
http://stackoverflow.com/questions/7981060/maven-archetype-plugin-doesnt-let-resources-in-archetype-resources-through/37322323#37322323)

BTW: The current solution in
opendaylight-startup/src/main/resources/META-INF/maven/archetype-metadata.xml
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
future.

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

Change-Id: I3d7d8708eb128d975879094f3775439e11721668
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 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 <tpanteli@brocade.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <tpanteli@brocade.com>
3 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 <tpanteli@brocade.com>
3 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
all-in-one).

Change-Id: Iadc3def3df2f4ff1e9ac647c538b9fe2c4001ca4
Signed-off-by: Stephen Kitt <skitt@redhat.com>
3 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 <tpanteli@brocade.com>
3 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
https://git.opendaylight.org/gerrit/#/c/39796/ 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 <tpanteli@brocade.com>
3 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 <rovarga@cisco.com>
3 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 <tpanteli@brocade.com>
3 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 <rovarga@cisco.com>
3 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 <tpanteli@brocade.com>
3 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 <tpanteli@brocade.com>
3 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 netconf.ssh.pk.path property from controller
etc/custom.properties file. It is netconf's project responsibility to
manage its own properties.

Needs to be merged after https://git.opendaylight.org/gerrit/#/c/39941/

Change-Id: Ib4d882c911682cc8a6844511c935f89aeddbced6
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
3 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 <tpanteli@brocade.com>
3 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 <adetalhouet@inocybe.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 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 <rovarga@cisco.com>
3 years agoRemove use of {String,UUID}Identifier 85/39885/2
Robert Varga [Mon, 6 Jun 2016 13:22:32 +0000 (15:22 +0200)]
Remove use of {String,UUID}Identifier

These classes do not provide an exact identity, derive proper
identities from Abstract{String,UIID}Identifier instead.

Change-Id: I9f607fdf468206211137a6dee196725f65274578
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoAdd more debug output in AbstractLeader and Follower 03/39903/2
Tom Pantelis [Thu, 2 Jun 2016 12:55:55 +0000 (08:55 -0400)]
Add more debug output in AbstractLeader and Follower

Adding more debug to help troubleshoot an issue.

Change-Id: Iff3e78157415de2841bb32f3dd588705d518b015
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
(cherry picked from commit 01c5a7cc52f8a438053d52ebb91e531493ca765a)

3 years agoDeprecate getModuleName()/getInstanceName() in AbstractConfigTestBase 91/39891/3
Tom Pantelis [Mon, 6 Jun 2016 07:44:38 +0000 (03:44 -0400)]
Deprecate getModuleName()/getInstanceName() in AbstractConfigTestBase

The AbstractConfigTestBase currently requires a config system
moduleName/instanceName to be provided by the derived class to ensure
the config module is pushed and present in JMX. However blueprint-enabled
apps won't have a config system module so deprecate these methods and
make them optional along with the check.

Change-Id: I1f2f6a993cf99ba25d766ba0ec20ed27b1a9915f
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
3 years agoFix compilation error 07/39907/4
Robert Varga [Mon, 6 Jun 2016 22:13:55 +0000 (00:13 +0200)]
Fix compilation error

SourceIdentifier has lost the public constructor. Use the static
factory method instead.

Change-Id: I634f8b8c9e9f7b92a4edbbad4580fb1bdf179eaf
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5280: eliminate ShardTransactionIdentifier 15/39015/25
Robert Varga [Tue, 17 May 2016 21:21:58 +0000 (23:21 +0200)]
BUG-5280: eliminate ShardTransactionIdentifier

This is very simple wrapper class which has two functions:
- carries a String transaction identifier (making it available)
- prepends it with 'shard-' in its toString() method

Analyzing the actual uses of this class revealed that the toString()
is called only when instantiating an actor, at which point either
the transaction identifier is already present, or a transaction
identifier is actually available through AbstractShardDataTreeTransaction.

The second case is actually not entirely accurate, as for the case
of remotely-created transactions we will actually use the actor name
for the transaction name, hence adding to the overall string-induced
confusion.

Moving the toString() method towards actor instantiation removes
the need to pass this class around and we can pass down normal
transaction identifiers.

This newfound unification allows us to eliminate duplication
in the Shard*Transaction classes, which can pick the identifier
from AbstractShardDataTreeTransaction, eliminating surface where
inconsistencies may be introduced.

Change-Id: If05f1bf2e76434d07feab115239addbb4b4bfb91
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5280: introduce DistributedDataStoreClientActor 83/38683/52
Robert Varga [Wed, 11 May 2016 21:20:45 +0000 (23:20 +0200)]
BUG-5280: introduce DistributedDataStoreClientActor

This patch introduces a common ClientActor, which keeps track of frontend
generations. Also introduce bind for DistributedDataStore, which uses this
common infrastructure.

Interface between the DistributedDataStore and the actor world is captured
as DistributedDataStoreClient.

Change-Id: I42c3281ca790fb5615a593740424ac494469e6a7
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5280: validate FrontendType regular expression 71/39571/9
Robert Varga [Sun, 29 May 2016 18:52:53 +0000 (20:52 +0200)]
BUG-5280: validate FrontendType regular expression

Isolate the regular expresison to a constant so it can be
compile-time tested via @RegEx.

Change-Id: I35277fe1e7c6c741ef286b577bb8da7b165e3481
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5932: Remove NETCONF startup knobs 66/39366/3
Robert Varga [Tue, 24 May 2016 17:07:25 +0000 (19:07 +0200)]
BUG-5932: Remove NETCONF startup knobs

These options are no longer used by the netconf plugin, remove them.

Change-Id: Idc81c22272c81389c48772bb16bb6a90e1c2a566
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoUse configured maximum memory to determine limits 01/37501/3
Robert Varga [Tue, 12 Apr 2016 14:51:59 +0000 (16:51 +0200)]
Use configured maximum memory to determine limits

Use of Runtime.totalMemory() leads to different behavior as memory grows,
meaning we will perform different snapshots based on initial memory sizing
as well as the memory pressures from other parts of the system (which mean
the total memory will grow differently).

Use Runtime.maxMemory() instead, which will cause snapshotting to work
consistently with a fully-used system.

Change-Id: If6e4a135dc0b9a9d4795d1e5d75f7cbc60550c0d
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoFix minor bug in ShardManager#removeShardReplica 63/39863/3
Tom Pantelis [Mon, 6 Jun 2016 01:25:07 +0000 (21:25 -0400)]
Fix minor bug in ShardManager#removeShardReplica

https://git.opendaylight.org/gerrit/#/c/38086/ introdcued a minor bug in
ShardManager#removeShardReplica. The intention was to cleanup
shardReplicaOperationsInProgress on failure so the added line should be
a call to remove and not add.

Change-Id: I36e01f3da75655f39c169c230e9b424a1c6236b9
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
3 years agoAdd config system API to recreate a module instance 78/38278/3
Tom Pantelis [Fri, 15 Apr 2016 19:19:50 +0000 (15:19 -0400)]
Add config system API to recreate a module instance

For the blueprint work, I need to be able to restart/recreate a
config module, ie close the previous instance and create a new instance,
when the corresponding service instance is recreated/re-advertised via
blueprint container restart.

The ConfigSubsystemFacade has no API to restart a config module. One
can push a new configuration but there has to be an actual change in
order for a new instance to be created otherwise it reuses the prior
instance.

Therefore I added a new EditStrategyType enum, recreate, with a
corresponding EditConfigStrategy class that forces re-creation of a
config module instance. This strategy calls a new
method, reCreateModule, on the ConfigTransactionController interface.

The decision logic to reuse or create a new instance is in the
AbstractModule class and generated derived classes. Therefore the
reCreateModule method sets a canReuseInstance flag on the real
AbstractModule instance. This is probably not the cleanest approach but
I wanted to avoid changing the Module interface as that looked to be too
invasive. The AbstractModule getInstance and canReuse methods check the
canReuseInstance override flag to determine if the old module/instance
can be reused.

Change-Id: I8cfb8408bae0127331676dcf32519b176f0a8844
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
3 years agoClean up pom.xml of archetypes projects (not archetypes content) 82/39482/2
Michael Vorburger [Thu, 26 May 2016 12:55:28 +0000 (14:55 +0200)]
Clean up pom.xml of archetypes projects (not archetypes content)

This removes a lot of duplication, which appears to be historical (we
can see that <distributionManagement> is meanwhile defined in
odl-parent; and <scm> in controller parent)

Change-Id: I4f033cb143c3317f86ea8dce2b8398fdb0b526b1
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 years agoGet rid of old Yang Parser in Controller 45/39645/6
Martin Ciglan [Tue, 31 May 2016 12:46:39 +0000 (14:46 +0200)]
Get rid of old Yang Parser in Controller

- Config part DONE
- MD-SAL part DONE
- bit of clean-up

Change-Id: I6bf4f8b81826d5ab61dd883fff3244f42d148375
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
3 years agoAdd src/main/yang as source path in build-helper-maven-plugin 77/39277/2
Michael Vorburger [Mon, 23 May 2016 16:37:21 +0000 (18:37 +0200)]
Add src/main/yang as source path in build-helper-maven-plugin

This is required by yangide so that in-workspace cross-project *.yang
references are correctly resolved; see
https://lists.opendaylight.org/pipermail/yangtools-dev/2016-May/001383.html
thread.

Change-Id: I68b7a6961bb42caf7d48d3bfdca0587cc1c1d1ab
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 years agoRemove M2E lifecycle-mapping <ignore/> for maven-checkstyle-plugin 22/39422/2
Michael Vorburger [Wed, 25 May 2016 15:08:21 +0000 (17:08 +0200)]
Remove M2E lifecycle-mapping <ignore/> for maven-checkstyle-plugin

This blocks Checkstyle for Controller from working in-IDE in
https://github.com/vorburger/opendaylight-eclipse-setup.  If a
individual developer still wants to disable it, that is still possible
locally, via menu Window > Preferences > Maven > Lifecycle Mapping.

Change-Id: I40d98cba30aa999fafebcbd82c6ea53696e971f0
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 years agoBUG-5280: optimize identifier serialization format 88/39288/17
Robert Varga [Tue, 24 May 2016 13:17:58 +0000 (15:17 +0200)]
BUG-5280: optimize identifier serialization format

Using ObjectOutput.writeObject() results in large overhead, resulting
in transaction identifiers weighing in at 549 bytes when used in an object.

Introduce WritableObject concept, which has a WriteTo(ObjectOutput) method
and a static factory method readForm(ObjectInput). This effectively means
we do not get Java Serialization headers.

Also make FrontendType a final class, adopting the WritableObject serialization,
which brings down the overhead to below 100 bytes.

Change-Id: I20294d4fdf309f250d507dfc675d8405c1fcf505
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoAdd @Ignore to failing test 21/39721/3
Robert Varga [Wed, 1 Jun 2016 15:47:23 +0000 (17:47 +0200)]
Add @Ignore to failing test

Unknown messages are routed to akka and elicit a warning, rendering
this test failing. Somehow this passed through validation, so ignore
the test to resume verify/merge jobs working.

Change-Id: I0adafe1cefa0794a0f6f8df2e4eeb903138af29c
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoImplement cluster admin RPCs to change member voting states 86/38086/6
Tom Pantelis [Wed, 20 Apr 2016 15:41:25 +0000 (11:41 -0400)]
Implement cluster admin RPCs to change member voting states

Added 3 new RPCs for changing voting states:
  change-member-voting-states-for-shard
  change-member-voting-states-for-all-shards
  flip-member-voting-states-for-all-shards

These replace the original ones added in Be that weren't implemented.
They were added as placeholders based on how it was thought it would
work at that time.

New related ShardManager messages were added that are sent by the
ClusterAdminRpcService.

The flip-member-voting-states-for-all-shards RPC is a shortcut that
obtains the current voting states via the GetOnDemandRaftState message
to the RaftActor and inverts them. New fields were added to the
OnDemandRaftState response to return the voting states.

Modified the ShardStats JXM bean to report the new OnDemandRaftState
fields.

Added a check in RaftActorServerConfigurationSupport to ensure that
there's at least 1 voting member otherwise one can end up with an
unusable shard with no ability to elect a leader.

Fixed a couple bugs in Leader and AbstractLeader that were found during
testing. AbstractLeader needs to take into account the follower's voting
state when determining if the leader is isolated.

Change-Id: I58686e3ce94d58de7cf289e55bb717ba46bc1de5
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
3 years agoFormat startup archetype much more nicely, and clean up stuff 75/39175/2
Michael Vorburger [Thu, 19 May 2016 12:55:59 +0000 (14:55 +0200)]
Format startup archetype much more nicely, and clean up stuff

This makes it not have any Checkstyle warnings, and Ctrl-Shift-F Format
Code produce no change (so it's "clean" out of the box)

Change-Id: Ia53e57362c1626df5ed9c01efff4b57c96989fa1
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
3 years agoEnforce Java 8 runtime 63/39063/5
Robert Varga [Wed, 18 May 2016 18:25:50 +0000 (20:25 +0200)]
Enforce Java 8 runtime

OpenDaylight Boron release is now supported only with Java 8,
make sure our startup script enforces that.

Change-Id: I03049ebbfadeb9a567f7018d08db47bf370299bb
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoEnsure AbstractUntypedActor#unknownMessage() is called 17/36117/9
Robert Varga [Fri, 11 Mar 2016 12:20:53 +0000 (13:20 +0100)]
Ensure AbstractUntypedActor#unknownMessage() is called

Our code is silently ignoring messages while there is an abstract method
provided for use when a message is not handled. Make sure we document
the contract and update implementations to call the method when they
encounter an unknown message.

Change-Id: I3c75fdb2c154b40c537813dd5a6bab8f47dc95cc
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBug 5836 - Set namespace for DOM nodes 92/39492/2
Jakub Morvay [Thu, 26 May 2016 14:35:24 +0000 (16:35 +0200)]
Bug 5836 - Set namespace for DOM nodes

Subtree filtering expects nodes with correct namespaces. XML constructed
in config subsystem netconf server does not contain correct namespaces
when in DOM format. Always include namespace when constructing DOM
nodes.

Change-Id: I4d67f224421b5951fd2a83442870add299e70c1c
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
3 years agoRemove duplicate property assignment 83/39483/3
Ryan Goulding [Thu, 26 May 2016 13:13:13 +0000 (09:13 -0400)]
Remove duplicate property assignment

mdsal.version is assigned twice, though it appears the only use of the
property is WRT controller mdsal artifacts.  I have removed the first
assignment, which was overwritten by the second assignment.

Change-Id: I320fa7c4124969ff3a384cf250879cf3f103d664
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
3 years agoChange declared exception 09/39409/3
Robert Varga [Wed, 25 May 2016 08:48:49 +0000 (10:48 +0200)]
Change declared exception

fixes a sonar warning: we should declare only specific checked
exceptions, not Exception.

Change-Id: Ibc4baf4db92bcc672284ce6689fbb3747f0efb9e
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoUpgrade karaf-resources to 3.0.6 50/39050/2
Stephen Kitt [Wed, 18 May 2016 15:07:59 +0000 (17:07 +0200)]
Upgrade karaf-resources to 3.0.6

Pull in updates from Karaf 3.0.6, and avoid hard-coding the Karaf
version.

Change-Id: I30a58982ff8f2e85efaecc8edbf7979ad5db3c54
Signed-off-by: Stephen Kitt <skitt@redhat.com>
3 years agoBUG-5917: use JVM-internal TransformerFactoryImpl 68/39368/5
Robert Varga [Tue, 24 May 2016 17:15:02 +0000 (19:15 +0200)]
BUG-5917: use JVM-internal TransformerFactoryImpl

This overrides karaf-3.0.6 to enable our XML components to work.

Change-Id: I1d070f9045f57ec15b1d1613a8b83e7a48a9c91e
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5626: remove ApplyLogEntries 88/38988/5
Robert Varga [Tue, 17 May 2016 16:09:24 +0000 (18:09 +0200)]
BUG-5626: remove ApplyLogEntries

This class has been held back by the now-removed payloads,
hence it is safe to remove.

Change-Id: Ib341dfbf5d4b80b53eb91da57db4a2d80e90d757
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5626: remove CompositeModification(ByteString)Payload 87/38987/5
Robert Varga [Tue, 17 May 2016 16:01:53 +0000 (18:01 +0200)]
BUG-5626: remove CompositeModification(ByteString)Payload

These payloads have not been emitted since before Lithium and Lithium
codebase performs snapshot on recovery, hence we should not be seeing
these in any supported upgrade scenario. Remove them and related bits
of code.

Change-Id: Ib96fb2d4a516d1235485e2a12c2398c593bfaaba
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoUse YangInstanceIdentifier.EMPTY 14/39014/7
Robert Varga [Tue, 17 May 2016 20:58:47 +0000 (22:58 +0200)]
Use YangInstanceIdentifier.EMPTY

While the empty build resolves to the same instance, inline the constant
directly saves a bit of the constant pool and makes it a bit more explicit.

Change-Id: I6c92183f473c551a882d2f2a23b5de13406b1982
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5626: remove createTypedTransactionActor() 89/38989/5
Robert Varga [Tue, 17 May 2016 13:49:11 +0000 (15:49 +0200)]
BUG-5626: remove createTypedTransactionActor()

This method has only a single internal caller, inline it for clarity.

Change-Id: I136274b2375b4bb91f35d21dd5d8a206d1272867
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5280: make sure all DistributedDataStore instances are shut down 29/38929/7
Robert Varga [Mon, 16 May 2016 11:38:09 +0000 (13:38 +0200)]
BUG-5280: make sure all DistributedDataStore instances are shut down

Fix up instantiation sites to eventually close the data store instance
they have created.

Change-Id: Ib71531c0263197209db6ec7de4f6c92d60db3d1d
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5626: Eliminate ShardIdentifier.Builder 09/38809/15
Robert Varga [Thu, 12 May 2016 14:46:52 +0000 (16:46 +0200)]
BUG-5626: Eliminate ShardIdentifier.Builder

This builder is completely useless, migrate it to static factory methods,
which provide equivalent functionality.

Change-Id: Ib2b5a1b14cb133bd819b3e163c217a05ed892787
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5280: use MemberName instead of String 02/38802/16
Robert Varga [Thu, 12 May 2016 14:13:08 +0000 (16:13 +0200)]
BUG-5280: use MemberName instead of String

Codebase uses Strings to identify various entities throughout
the code. Since we have introduced MemberName as an Identifier, use
that instead of a plain string to improve type safety and clarity
throughout users.

Change-Id: Iace25ef2c7cda0ea94449d1543d4ca73b80fb591
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5280: add cds-access-api identifiers 70/38670/16
Robert Varga [Wed, 11 May 2016 14:42:32 +0000 (16:42 +0200)]
BUG-5280: add cds-access-api identifiers

This patch adds a new component, which will hold the API exposed
by the CDS backend and used by the CDS frontend.

Change-Id: If0a2a6372b6cbbe898d2413bcd35259f7900a90a
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5626: use lambdas, Runnable and Consumer instead of Procedure 10/39010/2
Robert Varga [Tue, 17 May 2016 20:36:55 +0000 (22:36 +0200)]
BUG-5626: use lambdas, Runnable and Consumer instead of Procedure

This eliminates the use of Procedure in SnapshotManager, converting
- Procedure<Void> to java.lang.Runnable
- Procedure<byte[]] to java.util.function.Consumer

Adjust users to use lambdas, making the code more concise.

Change-Id: Iee8ec0f318e3cb38273289431ed8f80377aad912
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoDo not override protobuf version 19/38319/5
Robert Varga [Tue, 3 May 2016 11:45:24 +0000 (13:45 +0200)]
Do not override protobuf version

the version is declared in odlparent, no need to specify it again.

Change-Id: If151b2388c881dc6e5fae3ec1e30a6b921badce2
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoFix a typo in getDdatastoreContextFactory() 01/38801/3
Robert Varga [Thu, 12 May 2016 10:10:32 +0000 (12:10 +0200)]
Fix a typo in getDdatastoreContextFactory()

Change-Id: Ie4e3154f68afde14530a692a76a59617d4b1836c
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoEliminate unneeded String.format() 00/38800/3
Robert Varga [Thu, 12 May 2016 09:44:01 +0000 (11:44 +0200)]
Eliminate unneeded String.format()

Logger already supports formatting strings, no need to pre-format
them.

Change-Id: Iea96443126bad0ca483ec0cc775d081384028497
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoRemove AbstractRaftActorBehavior#findClientRequestTracker() 51/38651/5
Robert Varga [Wed, 11 May 2016 08:24:32 +0000 (10:24 +0200)]
Remove AbstractRaftActorBehavior#findClientRequestTracker()

This is an unused method, remove it. Also add some documentation
around trackers and simplify tracker-based messages.

Change-Id: Ia0afca836bd56b75dcdb74d6c6b309a9eeaa75ee
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoBUG-5626: use Identifier instead of String 32/38632/7
Robert Varga [Tue, 10 May 2016 12:16:27 +0000 (14:16 +0200)]
BUG-5626: use Identifier instead of String

Using a String for identifying replication entries is not flexible
enough. Yangtools has an Identifier concept and utility classes that
make this more flexible. Use these so we can evolve the identifiers
we use to track requests.

Change-Id: Ie5794d1e929300928c57cbec6d2fe22329fe6a5e
Signed-off-by: Robert Varga <rovarga@cisco.com>
3 years agoAdd clustered-app-config blueprint extension example to the toaster 35/38435/5
Tom Pantelis [Wed, 4 May 2016 09:41:23 +0000 (05:41 -0400)]
Add clustered-app-config blueprint extension example to the toaster

Added a toaster-app-config yang to utilize the clustered-app-config
blueprint extension as an example. The operational toaster's
manufacturer and model number were made configurable.

Change-Id: Ie4793ecf49ef42d07c6ca9fbce806533ca49aefd
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
3 years agoAdd clustered-app-config blueprint extension 90/38390/7
Tom Pantelis [Wed, 4 May 2016 02:20:06 +0000 (22:20 -0400)]
Add clustered-app-config blueprint extension

Added an extension that obtains a given binding DataObject type from the data
store and provides the DataObject instance to the Blueprint container as a
bean that can be injected into oher beans. In addition it registers a
ClusteredDataTreeChangeListener to restart the Blueprint container when the
data is changed. If no DataObject instance exists, an instance is created
with any defaults values populated. Default data may be specified via
the "default-config" child element which must contain the XML representation
of the yang data, including namespace, wrapped in a CDATA section to prevent
the blueprint container from treating it as markup.

It is assumed the given "binding-class" is a top-level yang container or
list, which seems reasonable. If it's nested then the full path would
have to be specified via XML which is doable but not worth the added
work if not necessary. We'll see if there's a use case for a nested app
config (I doubt it).

A list agg config would be used if there's multiple instances of the
app/module (eg "openflow-switch-connection-provider-impl" in the
openflowplugin). The "list-key-value" must be specified. It is assumed
there's only one list key and that it's a string, ie the yang list is
keyed by the name of app/module.

Change-Id: Ib970b003526d42c2a3db085036174967f055cbba
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
3 years agoMake Karaf dump heap on OOM by default 53/38653/2
Vratko Polak [Thu, 7 Apr 2016 14:49:42 +0000 (16:49 +0200)]
Make Karaf dump heap on OOM by default

See mails in this thread:
https://lists.opendaylight.org/pipermail/release/2016-March/006098.html
This changes DEFAULT_JAVA_OPTS,
so if user sets JAVA_OPTS it would override this.

Change-Id: I54fad73c5f50a6bf251bd3b255293ff3ef4ed877
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
3 years agoBUG-5626: split out CohortEntry 87/38587/3
Robert Varga [Mon, 9 May 2016 15:17:18 +0000 (17:17 +0200)]
BUG-5626: split out CohortEntry

This is a large static class, move it to its own file.

Change-Id: I79c161ec903369b969e649ddb37f96e62a8da829
Signed-off-by: Robert Varga <rovarga@cisco.com>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.