controller.git
5 years agoBump yangtools to 2.0.6.3 15/76215/1
Robert Varga [Tue, 18 Sep 2018 12:36:37 +0000 (14:36 +0200)]
Bump yangtools to 2.0.6.3

This bumps yangtools to 2.0.6.3, picking up latest fixes.

Change-Id: I41232350532e56340c1fe9853ef7e74e3aa03359
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoBump yangtools to 2.0.6.2 15/75615/1
Robert Varga [Fri, 31 Aug 2018 09:19:42 +0000 (11:19 +0200)]
Bump yangtools to 2.0.6.2

This brings in latest fixes.

Change-Id: Icf1cc33e730f54de12fa43b550cf261156c42cae
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoFix illegal check in CreateTransactionReply 40/75440/1
Robert Varga [Thu, 23 Aug 2018 14:02:40 +0000 (16:02 +0200)]
Fix illegal check in CreateTransactionReply

The null check is wrong here, as instanceof will evaluate to a boolean,
which will always result in a non-null reference. Fix this by using
checkArgument().

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

5 years agoFix prefix shard configuration update handling 09/75409/2
Robert Varga [Wed, 22 Aug 2018 16:48:30 +0000 (18:48 +0200)]
Fix prefix shard configuration update handling

If the list of shards is completely deleted, we end up jumping
into an empty method -- obviously missing updates. This codepath
is really shared, as DataTreeCandidateNode resolves recursively,
creating apropriate delta for children.

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

5 years agoDisable artery max frame size settingd 11/75411/1
Tom Pantelis [Wed, 22 Aug 2018 22:55:12 +0000 (18:55 -0400)]
Disable artery max frame size settingd

These were accidently set really large when we were first
looking at artery a while ago but they blow up with
java.lang.OutOfMemoryError: Direct buffer memory. So
set them to the defaults and comment them out.

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

5 years agoBump versions by x.y.(z+1) 32/75032/1
jenkins-releng [Thu, 9 Aug 2018 16:39:42 +0000 (16:39 +0000)]
Bump versions by x.y.(z+1)

Change-Id: Ibdb3e618ecf766f7fd546299dda0c17fa2666c7e
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoChange log to warn in LocalThreePhaseCommitCohort 06/74706/1
Tom Pantelis [Tue, 31 Jul 2018 18:22:14 +0000 (14:22 -0400)]
Change log to warn in LocalThreePhaseCommitCohort

Change-Id: Ieeb60989eb3665cad9cc4dc4d25c7ab7e0983437
JIRA:CONTROLLER-1855
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit bf95823bd121f75944e9a248731aee240f12fe5c)

5 years agoBump yangtools to 2.0.6.1 78/74678/1
Stephen Kitt [Tue, 31 Jul 2018 09:09:34 +0000 (11:09 +0200)]
Bump yangtools to 2.0.6.1

Change-Id: I10a397fd0b9b0e8b153060c62a34a369071755f3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoBump to odlparent 3.1.3 15/74515/1
Stephen Kitt [Thu, 26 Jul 2018 14:02:26 +0000 (16:02 +0200)]
Bump to odlparent 3.1.3

Change-Id: Ia1d81eeeabed44899e7e46b8b15ade85ca4d27cb
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoFix intermittent testFlipMemberVotingStates failure 08/74308/1
Tom Pantelis [Sat, 21 Jul 2018 03:26:47 +0000 (23:26 -0400)]
Fix intermittent testFlipMemberVotingStates failure

Failure was see in auto-release:

ClusterAdminRpcServiceTest.testFlipMemberVotingStates:976->lambda$testFlipMemberVotingStates$8:978 Expected leader member-1. Actual: member-1-shard-cars-oper_testFlipMemberVotingStates

The test output showed it timed out trying to transfer leadership to member-3. The
timeout deadline is the election timeout interval which is the
heartbeatInterval * election-timeout-factor which were set to 300 and 1.
It seems 300ms is a bit too low for comfort so I changed it to 1000ms (100 * 10);

Change-Id: I1e3c79de960dcced8af71fecdf1ab8bdba433448
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit 19dda47fc3d00213fbddd3c6a70cbb5b3c898c8a)

5 years agoTrace the originating generation in RGE 64/73564/1
Stephen Kitt [Thu, 28 Jun 2018 11:48:21 +0000 (13:48 +0200)]
Trace the originating generation in RGE

This adds the originating generation in RetiredGenerationException’s
message.

Change-Id: Ie4cb11a0cc151176d765fc6d200cd7dd295798e1
Signed-off-by: Stephen Kitt <skitt@redhat.com>
(cherry picked from commit 9b235df8e0b4d8c4c7419419538188cdf7b2bfc2)

5 years agoFix shard deadlock in 3 nodes 54/73454/1
Tom Pantelis [Tue, 12 Jun 2018 11:54:30 +0000 (07:54 -0400)]
Fix shard deadlock in 3 nodes

JIRA: CONTROLLER-1836
Change-Id: I10a9cb43bcdb35f66abebb054f37c05e7fda54e7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoBump to odlparent 3.1.1 85/73085/3
Stephen Kitt [Mon, 18 Jun 2018 08:30:56 +0000 (10:30 +0200)]
Bump to odlparent 3.1.1

Change-Id: I16d53ae627c737398c13cadaf0838d80314b1bf8
JIRA: RELENG-129
Signed-off-by: Stephen Kitt <skitt@redhat.com>
5 years agoexport two additional packages containing JMX *M[X]Bean 30/73230/1
Michael Vorburger [Fri, 8 Jun 2018 11:51:19 +0000 (13:51 +0200)]
export two additional packages containing JMX *M[X]Bean

required to access some information this exposes via strong
instead "stringly" typing in genius.DatastoreServiceStatusProvider; see
Ic8df4299b46a4dd21310619e295552404266fb80.

JIRA: GENIUS-138
Change-Id: Ie0cb62db5ee2dd98fa1a0e55791c9551089e6aac
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
(cherry picked from commit 6100355605ee6f40356c6574bc1bea726887fe4a)

5 years agoFix pax exam issue 18/73118/1
Tom Pantelis [Sun, 17 Jun 2018 15:02:08 +0000 (11:02 -0400)]
Fix pax exam issue

auto-release is all of a sudden seeing these failure for the
ToasterTest:

2018-06-17T01:54:27,557 | WARN  | pool-2-thread-1  | AetherBasedResolver              | 2 - org.ops4j.pax.url.mvn - 2.5.4 | Error resolving artifact org.ops4j.pax.tipi:org.ops4j.pax.tipi.junit:jar:4.12.0.1: [Could not find artifact org.ops4j.pax.tipi:org.ops4j.pax.tipi.junit:jar:4.12.0.1 in defaultlocal (file:/tmp/r/), Could not find artifact org.ops4j.pax.tipi:org.ops4j.pax.tipi.junit:jar:4.12.0.1 in system.repository (file:/w/workspace/autorelease-release-oxygen/controller/opendaylight/md-sal/samples/toaster-it/target/exam/f302a2c9-2cc5-40dc-8c2b-02b85c0fe216/system/)]

2018-06-17T01:54:27,557 | WARN  | pool-2-thread-3  | AetherBasedResolver              | 2 - org.ops4j.pax.url.mvn - 2.5.4 | Error resolving artifact org.ops4j.pax.tipi:org.ops4j.pax.tipi.hamcrest.core:jar:1.3.0.1: [Could not find artifact org.ops4j.pax.tipi:org.ops4j.pax.tipi.hamcrest.core:jar:1.3.0.1 in defaultlocal (file:/tmp/r/), Could not find artifact org.ops4j.pax.tipi:org.ops4j.pax.tipi.hamcrest.core:jar:1.3.0.1 in system.repository (file:/w/workspace/autorelease-release-oxygen/controller/opendaylight/md-sal/samples/toaster-it/target/exam/f302a2c9-2cc5-40dc-8c2b-02b85c0fe216/system/)]

I was able to repro locally by removing the
org.ops4j.pax.tipi.hamcrest.junit and org.ops4j.pax.tipi.hamcrest.core artifacts
from ny local .m2 repo. Adding the dependencies to the mdsal-it-base pom
causes them to be downloaded and fixes the issue. However it's a mystery why
this issue all of a sudden popped up and why it seems we have to explicitly
reference those depnedencies.

Change-Id: Ic614f243d0a79aa298961a4a340d4fa3fb483843
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit 7843fba86f5b123755eb53d19f7a001312897a72)

5 years agofix FollowerInfo @ConstructorProperties for valid ShardStatsMXBean 11/72811/2
Michael Vorburger [Fri, 8 Jun 2018 13:41:01 +0000 (15:41 +0200)]
fix FollowerInfo @ConstructorProperties for valid ShardStatsMXBean

JIRA: CONTROLLER-1835
Change-Id: I563105e8af79c0687cbb99444b34b540e80cbaa5
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
(cherry picked from commit bb813bc67d165b02078e0d9aaa194d3232e170e5)

5 years agomake Transaction Trace re-use BindingToNormalizedNodeCodec instead new 15/72715/2
Michael Vorburger [Thu, 31 May 2018 15:51:11 +0000 (17:51 +0200)]
make Transaction Trace re-use BindingToNormalizedNodeCodec instead new

JIRA: CONTROLLER-1832
Change-Id: I2b9800c9f6d52aa696904c70d673eba7cc2b085d
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
(cherry picked from commit 5e29d53509ce1172bf5e76329b409f126ce790bd)

5 years agofix tracing ping-pong DataBroker wiring bug in trace blueprint XML 16/72716/2
Michael Vorburger [Mon, 4 Jun 2018 13:13:48 +0000 (15:13 +0200)]
fix tracing ping-pong DataBroker wiring bug in trace blueprint XML

JIRA: CONTROLLER-1834
Change-Id: I4fda43c578ee55218acc40be1fbf4427c81c73c3
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
(cherry picked from commit 5fe007578adfc50cd710274b2a93a18b39bacbe8)

5 years agoBUG-8858: remove sleeps from test driver 17/72717/4
Robert Varga [Tue, 22 Aug 2017 08:51:58 +0000 (10:51 +0200)]
BUG-8858: remove sleeps from test driver

This is a follow-up patch to speed up test driver, properly
chasing leader, without any sleeps incurred.

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

5 years agoBump versions by x.y.(z+1) 22/72922/1
jenkins-releng [Wed, 13 Jun 2018 00:07:27 +0000 (00:07 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I8b8751b9b705ddd0aa618273e37ede8aa906b908
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
5 years agoFix shard commit deadlock 57/72657/3
Tom Pantelis [Mon, 4 Jun 2018 12:20:26 +0000 (08:20 -0400)]
Fix shard commit deadlock

When performing coordinated commits we need to ensure transactions
hit all shards in the same order as otherwise we could end up
with an ABBA deadlock -- which gets resolved through commits timing
out, but nevertheless it imposes a dealy of up to 30 seconds.

Make sure we always send entries to shards in the same order and
also synchronize all TransactionProxy instances so that transactions
have a total order.

JIRA: CONTROLLER-1833
Change-Id: Ia3076efde1c7cb5f115305593776ffa7422e7a09
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
5 years agoAdd MDSAL TRACE to Artifacts 53/72653/1
Claudio D. Gasparini [Mon, 4 Jun 2018 11:40:27 +0000 (13:40 +0200)]
Add MDSAL TRACE to Artifacts

Change-Id: I6ddc0557b4a99d7423d175b3397a60f09f73de7c
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
(cherry picked from commit 3417dcaad1c2c187413b0c64a0c6ccdd546e794c)

5 years agoAdd get-top rpc with output to sal-test-model 96/72596/1
Tom Pantelis [Thu, 17 May 2018 12:08:21 +0000 (08:08 -0400)]
Add get-top rpc with output to sal-test-model

Need an rpc with output for a netconf UT.

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

5 years agoBump yangtools to 2.0.5 29/72229/2
Robert Varga [Thu, 24 May 2018 12:17:44 +0000 (14:17 +0200)]
Bump yangtools to 2.0.5

This patch bumps the version pulled in to 2.0.5, adopting the fixes
it contains.

Change-Id: I275b26cd9fbb299050cf1bae8bc4db26b7a0b335
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
5 years agoAdd path context to data validation failures 50/72250/1
Tom Pantelis [Mon, 21 May 2018 16:07:51 +0000 (12:07 -0400)]
Add path context to data validation failures

JIRA: CONTROLLER-1830

Change-Id: I588303ef2bbe01f8267da32b6b37d327dcbfbeb4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
(cherry picked from commit 52725324973f22ac0c85ed4fd8459cf0ef504407)

5 years agoRely on odlparent version of jolokia 26/71026/3
Ryan Goulding [Thu, 12 Apr 2018 15:41:46 +0000 (11:41 -0400)]
Rely on odlparent version of jolokia

Now that the desired jolokia version is present in odlparent,
rely on pulling it from there instead of locally.

Change-Id: Ief20a133a34b13ec487e04ddabe313a71aaba66d
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
(cherry picked from commit b9ec6955be85a4fb297367d61b7664e645e72dd7)

5 years agoRemove jersey-core dependency in CSS 69/71069/2
Tom Pantelis [Tue, 17 Apr 2018 19:06:55 +0000 (15:06 -0400)]
Remove jersey-core dependency in CSS

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

5 years agoBump versions by x.y.(z+1) 30/71330/1
jenkins-releng [Wed, 25 Apr 2018 18:24:25 +0000 (18:24 +0000)]
Bump versions by x.y.(z+1)

Change-Id: I396686df0c7a31846676cdd0c7303c5316466545
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoRelease permits as transactions are replayed 40/70840/8
Robert Varga [Thu, 12 Apr 2018 11:11:38 +0000 (13:11 +0200)]
Release permits as transactions are replayed

Since we have correct accounting at the cost of needing to finish
the transition to new context in user thread, we need to make sure
we release permits as we push them towards the TransactionContext
if it is not handling it itself -- hence the user threads will not
be charged for operations which have logically been completed.

CONTROLLER-1825
Change-Id: I4bae984b08b99a042766d0a41475110781ef8377
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix TransactionContextWrapper limiter accounting 84/70384/2
Robert Varga [Thu, 5 Apr 2018 14:49:06 +0000 (16:49 +0200)]
Fix TransactionContextWrapper limiter accounting

The fix for CONTROLLER-1814 wrecked the fragile OperationLimiter
accounting between TransactionContextWrapper and
RemoteTransactionContext. The problem is that during initial
connect time TransactionContextWrapper acquires limiter operations
and the state of the OperationLimiter is inherited by
RemoteTransactionContext. This though means that we need to know
which operation actually acquired a permit and which did not.

As it turns out, this needs to make TransactionContext methods take
an additional hint as to whether a limit attempt was made and what
was the result of it.

Furthermore the internal TransactionContextWrapper logic needs to
be changed from 'enqueue and wait' to 'wait and enqueue' strategy,
so when an operation is added to the queue and potentially picked
up by executePriorTransactionOperations() we already know whether
a permit was acquired or not.

JIRA: CONTROLLER-1823
Change-Id: I78d43a1abde8c6da6e3da2f56823bba130499133
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b69500a51978c3d3ef639345a1a97a58cc3f6bb8)

6 years agoBump to odlparent 3.1.0 and yangtools 2.0.3 87/69987/8
Stephen Kitt [Fri, 23 Mar 2018 13:11:09 +0000 (14:11 +0100)]
Bump to odlparent 3.1.0 and yangtools 2.0.3

Change-Id: Ic95557eda8dc9657cf8b41ce84b9f5748fc04a09
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoFinish SimpleReplicatedLogEntry migration 17/70417/1
Stephen Kitt [Fri, 6 Apr 2018 08:55:02 +0000 (10:55 +0200)]
Finish SimpleReplicatedLogEntry migration

sal-akka-raft-example still refers to ReplicatedLogImplEntry, fix
that.

Change-Id: I6574b0acfd0d8c755b5cbc69485fa4d0ea116865
Signed-off-by: Stephen Kitt <skitt@redhat.com>
(cherry picked from commit 001d9fbebdc56686eb5209d7099fc401878e2bca)

6 years agoMove OperationLimiter.acquire() warnings to callers 46/69946/1
Robert Varga [Tue, 23 Jan 2018 16:42:44 +0000 (17:42 +0100)]
Move OperationLimiter.acquire() warnings to callers

We have two distinct call sites from where we are acquiring permits,
where failure to acquire has different root cause:
RemoteTransactionContext's failure to acquire indicates a slow leader,
while TransactionContextWrapper indicates a failure to discover a leader
in time.

Modify acquire() to report success and log failures to acquire from
the two call sites, with different messages so it is immediately clear
what is going on.

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

6 years agoFix odl-config-persister 45/69945/1
Robert Varga [Thu, 22 Mar 2018 15:01:36 +0000 (16:01 +0100)]
Fix odl-config-persister

It should not be pulling in facade-xml bundle, but feature.

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

6 years agoFix duplicate benchmark packaging 44/69944/1
Robert Varga [Thu, 22 Mar 2018 14:44:37 +0000 (15:44 +0100)]
Fix duplicate benchmark packaging

mvn:org.opendaylight.controller/dsbenchmark and
mvn:org.opendaylight.controller/ntfbenchmark are being repackaged
in odl-mdsal-benchmark. Pull corresponding features instead.

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

6 years agoChange transformation from DOMRpcResult to RpcResult 02/69602/5
Peter Nosal [Mon, 19 Mar 2018 07:57:29 +0000 (08:57 +0100)]
Change transformation from DOMRpcResult to RpcResult

When RpcResult was created, it was always as successful RpcResult,
this is changed so in presence of RpcErrors, RcpResult is build as
failed RpcResult with RpcErrors and binding result.

Change-Id: Ibb74e5f5675e33e0103d1a7d4962176bb320fce3
Signed-off-by: Peter Nosal <peter.nosal@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoodl-controller-model-topology should not pull in yangtools 34/69434/3
Robert Varga [Tue, 13 Mar 2018 13:02:09 +0000 (14:02 +0100)]
odl-controller-model-topology should not pull in yangtools

This feature's explicit dependency on odl-yangtools-codec is bogus,
remove it.

Change-Id: Idbade3e1a0edb63988c92f62c3b727c6446b094d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix RemoteTransactionContext limiter accounting 99/68899/2
Robert Varga [Fri, 9 Feb 2018 15:55:27 +0000 (16:55 +0100)]
Fix RemoteTransactionContext limiter accounting

In case we lose connectivity between the frontend and backend
at the early stages of a big transaction, e.g. after the transaction
is created at the backend and before it is submitted, we can run into
OperationLimiter preventing recovery.

The reason for this is that OperationLimiter itself does not know
how many permits a BatchedModification request contained, hence
on AskTimeoutException it would only decrement permits by one
and the operations would remain throttled. With large transactions
this means the application will suddenly become bogged down
by the OperationLimiter, preventing it from submitting the transaction
or otherwise recovering.

Once any BatchedModifications request fails, the transaction is
doomed anyway, as the message counts on frontend and backend will not
match. Furthermore we must not issue any reads -- the backed does
not have all the modifications, hence it could return an incorrect
result.

Move permit tracking to RemoteTransactionContext, where we can capture
the number of permits in the OnComplete that gets invoked, properly
returning permits which correspond to the BatchedModifications message.
If we have failed to acquire a permit, we also note that and do not
underflow the semaphore.

In case a BatchedModifications message fails, we mark that fact and
turn into a bypass mode: we fail any subsequent reads and do not send
any further BatchedModifications until we see ready being set -- at
which point we coordinate with backend to shoot down the transaction.

An alternative strategy would be to continue transmitting
BatchedModifications, but that would incur an AskTimeout during split,
slowing down the time it takes us to kill flush the doomed transaction
out of the system.

JIRA: CONTROLLER-1814
Change-Id: I919bae0e7173910665e8ec2342d076a710c1c7bf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7925d904ffd56c13ddde53e0e7bf6b08b437757d)

6 years agoBump versions by x.y.(z+1) 34/69834/1
jenkins-releng [Thu, 22 Mar 2018 16:57:42 +0000 (16:57 +0000)]
Bump versions by x.y.(z+1)

Change-Id: Ibaaca6dfd7fd31d3f0779fcfe675cf0b5073e338
Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
6 years agoSwitch model-topology to odlparent 3.0.2 65/68765/1
Stephen Kitt [Mon, 26 Feb 2018 12:04:18 +0000 (13:04 +0100)]
Switch model-topology to odlparent 3.0.2

This module was still on 2.0.5...

Change-Id: I4afe2fffcb3fbad1264f50c41115168843b5b945
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoUpdate .gitreview to stable/oxygen 93/68693/1
Anil Belur [Mon, 26 Feb 2018 06:59:41 +0000 (16:59 +1000)]
Update .gitreview to stable/oxygen

Change-Id: I8c43525a2592149f136c261b2fc77a7d3b41bd36
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
6 years agoExport model-topology as a feature 18/68318/7
Faseela K [Thu, 15 Feb 2018 19:08:38 +0000 (00:38 +0530)]
Export model-topology as a feature

This is required by openflowplugin.
They should be consumable as feature, not bundle.

For detailed discussion, please refer to the followings
https://lists.opendaylight.org/pipermail/release/2018-January/013604.html
https://lists.opendaylight.org/pipermail/release/2017-September/012356.html

Change-Id: I3fb42770efec22a84b143f05ba0329d591eb2a16
Signed-off-by: Faseela K <faseela.k@ericsson.com>
6 years agoFix ReadyLocalTransactionSerializer 02/68402/2
Robert Varga [Mon, 8 Jan 2018 12:22:08 +0000 (13:22 +0100)]
Fix ReadyLocalTransactionSerializer

The following exception was seen in the field:

2017-12-20 19:37:05,507 | ERROR | ult-dispatcher-2 | Remoting                         | 174 - com.typesafe.akka.slf4j - 2.4.7 | java.lang.ClassNotFoundException: org.opendaylight.controller.cluster.datastore.messages.BatchedModifications
org.apache.commons.lang3.SerializationException: java.lang.ClassNotFoundException: org.opendaylight.controller.cluster.datastore.messages.BatchedModifications
        at org.apache.commons.lang3.SerializationUtils.deserialize(SerializationUtils.java:229)
        at org.apache.commons.lang3.SerializationUtils.deserialize(SerializationUtils.java:267)
        at org.opendaylight.controller.cluster.datastore.messages.ReadyLocalTransactionSerializer.fromBinaryJava(ReadyLocalTransactionSerializer.java:49)
        at akka.serialization.JSerializer.fromBinary(Serializer.scala:177)
        at akka.serialization.Serialization$$anonfun$deserialize$2.apply(Serialization.scala:124)
        at scala.util.Try$.apply(Try.scala:192)
        at akka.serialization.Serialization.deserialize(Serialization.scala:114)
        at akka.remote.serialization.MessageContainerSerializer.fromBinary(MessageContainerSerializer.scala:80)
        at akka.serialization.Serialization$$anonfun$deserialize$2.apply(Serialization.scala:124)
        at scala.util.Try$.apply(Try.scala:192)
        at akka.serialization.Serialization.deserialize(Serialization.scala:114)
        at akka.remote.MessageSerializer$.deserialize(MessageSerializer.scala:24)
        at akka.remote.DefaultMessageDispatcher.payload$lzycompute$1(Endpoint.scala:60)
        at akka.remote.DefaultMessageDispatcher.payload$1(Endpoint.scala:60)
        at akka.remote.DefaultMessageDispatcher.dispatch(Endpoint.scala:78)
        at akka.remote.EndpointReader$$anonfun$receive$2.applyOrElse(Endpoint.scala:978)
        at akka.actor.Actor$class.aroundReceive(Actor.scala:484)
        at akka.remote.EndpointActor.aroundReceive(Endpoint.scala:447)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
        at akka.actor.ActorCell.invoke(ActorCell.scala:495)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
        at akka.dispatch.Mailbox.run(Mailbox.scala:224)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
        at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: org.opendaylight.controller.cluster.datastore.messages.BatchedModifications
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:683)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1863)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1746)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2037)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1568)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
        at org.apache.commons.lang3.SerializationUtils.deserialize(SerializationUtils.java:223)
        ... 26 more

As it turns out, ReadyLocalTransactionSerializer is not following JSerializer
documentation recommendations of loading classes via ExtendedActorSystem.

Change-Id: Idef62f8c7a50d607ef152083693fac63c7e92447
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoAdd AbstractDOMBrokerTransaction.toString() 00/68400/2
Robert Varga [Tue, 23 Jan 2018 18:13:10 +0000 (19:13 +0100)]
Add AbstractDOMBrokerTransaction.toString()

It is quite common for applications to mis-synchronize transaction
chain closure, which may lead to stale transactions. Unfortunately
the message produced in such situations:

2017-12-21 14:21:56,008 | ERROR | CommitFutures-48 | ExecutionList                    | 38 - com.google.guava - 18.0.0 | RuntimeException while executing runnable com.google.common.util.concurrent.Futures$6@6d954ae with executor INSTANCE
java.lang.IllegalStateException: Attempted to close chain with outstanding transaction PingPongTransaction{delegate=org.opendaylight.controller.cluster.databroker.DOMBrokerReadWriteTransaction@7523c916}

does not give us enough information to correlate the impact of such
failures.

Add AbstractDOMBrokerTransaction.toString(), which results
in the message having actual transaction identifier, so that these
failures can be correlated.

Change-Id: Id4620df4285ec6d3ba24bbcd8f5ab8c1a29e0687
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoMake FollowerLogInformation a class 36/67536/5
Robert Varga [Wed, 24 Jan 2018 01:26:58 +0000 (02:26 +0100)]
Make FollowerLogInformation a class

This really is a mutable state holder, there is no good reason why
it should be split into an interface and an implementation.

Change-Id: I63a080a4f04bfa4baf1eb291a06140605a50762c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoAdd clustering IT tests to mdsal-artifacts 50/68250/1
Robert Varga [Wed, 14 Feb 2018 15:36:00 +0000 (16:36 +0100)]
Add clustering IT tests to mdsal-artifacts

All artifacts produced should be listed here, fix that.

Change-Id: Ic8c198a69553b471f934e3052742bdc36664ccec
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoPackage config-util into odl-config-util 07/68207/2
Robert Varga [Tue, 13 Feb 2018 19:00:14 +0000 (20:00 +0100)]
Package config-util into odl-config-util

Netconf is using the XML packages in config-util extensively,
so we should package it separately from odl-config-core to express
the dependency correctly.

JIRA: NETCONF-508
Change-Id: Id3f0b88f1ebcb9bd41292ecb948e15e6ffcde49d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoAAA-147: Jolokia credentials are backed by AAA 69/68069/2
Ryan Goulding [Thu, 8 Feb 2018 19:04:53 +0000 (14:04 -0500)]
AAA-147: Jolokia credentials are backed by AAA

Upgrade jolokia-osgi to enable use of "authMode=service-all".  This
was added by:

https://github.com/rhuss/jolokia/commit/ \
1441b0df476e7bb5728d32210e13d18aaaa783cb

A corresponding patch is added in AAA to add an Authenticator to the
OSGi service registry which is backed by ODL AAA.

This closes the vulnerability of using plaintext credentials for
odl-jolokia, and also centralizes credential management.

Change-Id: I5d3a63e47adefbcae96f3794b51da69a3f4980c5
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoDelay snapshot backed transaction ready error 14/67914/3
Jaime Caamaño Ruiz [Mon, 5 Feb 2018 11:07:42 +0000 (12:07 +0100)]
Delay snapshot backed transaction ready error

Delay snapshot backed transaction ready error to 3PC canCommit.

Change-Id: Ief659423b401936a286f04c2f6c3732722c5aabf
JIRA: CONTROLLER-1812
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
6 years agoFix infinite loop on cancel transaction 04/67804/7
Jaime Caamaño Ruiz [Thu, 1 Feb 2018 09:02:46 +0000 (10:02 +0100)]
Fix infinite loop on cancel transaction

This patch fixes a problem where you would run into an infinite loop
after cancelling DOMForwardedWriteTransaction following an exception
thrown by the backed transaction ready or submit methods.

Change-Id: I24ce3706dcc52e35890246b4796090cd6b1c99b9
JIRA: CONTROLLER-1812
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
6 years agoMDSAL-298: properly handle unkeyed lists 62/67662/4
Robert Varga [Mon, 29 Jan 2018 13:22:35 +0000 (14:22 +0100)]
MDSAL-298: properly handle unkeyed lists

Unkeyed lists are not representable in binding, which means they
cannot be reported as modified children, either. This has implications
for any data change which contains unrepresentable fields as child
modifications.

Previously we would report SUBTREE_MODIFIED for the container node,
but would fail to report any children, which is obviously wrong, as the
user is left guessing as to what exactly happened.

This patch modifies LazyDataObjectModification to report a WRITE event
if modifications to unrepresentable children are found in SUBTREE_MODIFIED
case.

It also reuses BindingStructuralType from md-sal, so that we do not have
two copies of this critical class lying around requiring maintenance.

Change-Id: I30599bc26d3c993c5b6c5e2f9e6f66144a530cb5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoCONTROLLER-1641: Handle commit cohorts async 85/66885/6
Tom Pantelis [Fri, 5 Jan 2018 01:04:41 +0000 (20:04 -0500)]
CONTROLLER-1641: Handle commit cohorts async

Modified CompositeDataTreeCohort to handle response messages from
the DataTreeCohortActor async. The canCommit, preCommit, and commit
methods now return an Optional CompletionStage that is present when
there are commit cohorts. On completion of the cohort actor Futures, a
Runnable is executed in the shard actor to process the responses and
complete the returned CompletionStage. The call sites in
SimpleShardDataTreeCohort execute their own callbacks on completion.

Change-Id: Ib1a22e059dabfe87a1ee141baae655601f9ce700
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoDisable archetype self testing 21/67821/1
Michael Vorburger [Thu, 1 Feb 2018 16:40:38 +0000 (17:40 +0100)]
Disable archetype self testing

because it breaks autorelease, see
https://lists.opendaylight.org/pipermail/controller-dev/2018-February/014185.html

Change-Id: Ice64ff8b87d57faa7442767a39b84420671cb8d4
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoRename odl-mdsal-common to odl-controller-mdsal-common 78/67578/6
Robert Varga [Thu, 25 Jan 2018 15:26:27 +0000 (16:26 +0100)]
Rename odl-mdsal-common to odl-controller-mdsal-common

Feature names are a flat namespace and odl-mdsal-common is conflicting
with a feature provided by mdsal. Since odl-mdsal- is mdsal's part
of the namespace, rename the feature to be in controller's namespace.

Change-Id: I986ae7574caea1f2a32b802a5b2a5873d6ac8c60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix ModificationType.APPEARED mapping 54/67654/5
Robert Varga [Mon, 29 Jan 2018 11:02:41 +0000 (12:02 +0100)]
Fix ModificationType.APPEARED mapping

When a node appears, it is an event equivalent to a WRITE,
not SUBTREE_MODIFIED, otherwise we are logically crossing
a non-existent node.

Change-Id: I0876a18ec4af799db30c384fe4a7e38b9b2833c7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoCONTROLLER-1641: Integrate DataTreeCohortActor with pipe-lining 61/66861/5
Tom Pantelis [Thu, 4 Jan 2018 04:52:12 +0000 (23:52 -0500)]
CONTROLLER-1641: Integrate DataTreeCohortActor with pipe-lining

The DataTreeCohortActor was originally written assuming that only
one 3-phase commit was in progress at any time and thus maintained
a single state. However with transaction pipe-lining there can be
multiple simultaneous 3-phase commits so DataTreeCohortActor was
modified to maintain/track state per transaction.

In addition, it now also handles the DOMDataTreeCommitCohort
Futures async.

Change-Id: Ib7588ea2e32b297a2db0b532726549f9ec61a1a4
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoCONTROLLER-1764: avoid refreshes 33/65933/5
Stephen Kitt [Mon, 27 Nov 2017 16:25:18 +0000 (17:25 +0100)]
CONTROLLER-1764: avoid refreshes

odl-mdsal-trace can no longer be installed with Karaf 4, because of a
number of bundle refreshes which result in the datastore restarting
while changing classloaders, resulting in chaos. This patch enforces a
number of optional dependencies, avoiding the refreshes.

Change-Id: I8f5c75c454c40a19f9a4996571f6f8505de00fb0
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoFix intermittent RemoteRpcRegistryMXBeanImplTest failures 93/67593/4
Tom Pantelis [Fri, 26 Jan 2018 05:48:41 +0000 (00:48 -0500)]
Fix intermittent RemoteRpcRegistryMXBeanImplTest failures

testFindRpcByRoute(org.opendaylight.controller.remote.rpc.registry.mbeans.RemoteRpcRegistryMXBeanImplTest)  Time elapsed: 0.98 sec  <<< ERROR!
java.lang.IllegalStateException: Attempted to access local bucket before recovery completed
at com.google.common.base.Preconditions.checkState(Preconditions.java:501)
at org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreActor.getLocalBucket(BucketStoreActor.java:384)
at org.opendaylight.controller.remote.rpc.registry.gossip.BucketStoreActor.getLocalData(BucketStoreActor.java:110)
at org.opendaylight.controller.remote.rpc.registry.mbeans.RemoteRpcRegistryMXBeanImpl.findRpcByRoute(RemoteRpcRegistryMXBeanImpl.java:91)
at org.opendaylight.controller.remote.rpc.registry.mbeans.RemoteRpcRegistryMXBeanImplTest.testFindRpcByRoute(RemoteRpcRegistryMXBeanImplTest.java:142)

The problem is that the RemoteRpcRegistryMXBeanImpl access the enclosing
RpcRegistry Actor instance directly and violates actor encapsulation.
RemoteRpcRegistryMXBeanImpl should access the RpcRegistry via messages
sent to its ActorRef.

Change-Id: Icfd67c38e5d1bc3de283949207009d7aa34ab855
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoDataBrokerTestModule getBindingToNormalizedNodeCodec() & Co. 66/67266/5
Michael Vorburger [Thu, 18 Jan 2018 02:15:23 +0000 (03:15 +0100)]
DataBrokerTestModule getBindingToNormalizedNodeCodec() & Co.

need these exposed for a new standalone component style test  I'm on

Change-Id: I5efd3a6e507d46d035067a561aaca7c2f80f51e6
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoRemove stax-utils from features 74/67574/1
Robert Varga [Thu, 25 Jan 2018 14:50:46 +0000 (15:50 +0100)]
Remove stax-utils from features

This dependency should not be needed, removed it.

Change-Id: I712f1ee6a4f525a4053e5082fd3fe8b0fa4aa8a9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoFix the inner order of switchBehavior in RaftAcotr 44/67144/2
何运波10202176 [Mon, 15 Jan 2018 01:32:32 +0000 (09:32 +0800)]
Fix the inner order of switchBehavior in RaftAcotr
updateAndPersist should be called before switchBehavior.
Otherwise, when the EntityOwnershipShard trigger a new write transaction
in onLeaderChanged base on last term, It will lead to fail in this
transaction because of the term value is inconsistent between AppendEntries
and AppendEntriesReply

Change-Id: I9118f7ec283f23e02dc285ccf6a3fbbce47dc508
Signed-off-by: HeYunBo <he.yunbo@zte.com.cn>
6 years agoMigrate from JavaTestKit to javadsl.TestKit 22/65622/11
Robert Varga [Thu, 16 Nov 2017 13:59:36 +0000 (14:59 +0100)]
Migrate from JavaTestKit to javadsl.TestKit

Remove use of deprecated class and use its 2.5.0 replacement. This
leaves a single instance of this class are RaftActorTestKit
and ShartTestKit which will need to be migrated in a follow-up patch.

Change-Id: I5c112f9984bec3ecf2da530f3505aceb83fa1e05
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoCONTROLLER-1811: Fix IT hang in startup archetype 11/67511/2
Tom Pantelis [Tue, 23 Jan 2018 16:27:08 +0000 (11:27 -0500)]
CONTROLLER-1811: Fix IT hang in startup archetype

The IT uses the local karaf distro which adds the feature to
the featuresBoot which seems to cause an issue as the test code
also installs the feature. I also changed the test to just install
the impl feature and not the rest feature as the latter is not needed
for IT.

Change-Id: I471c1c1bef444f528f2703b0931416fb3dfcf6cd
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoCONTROLLER-1809: De-deplicate extraneous ManagedService updates 48/67448/2
Tom Pantelis [Mon, 22 Jan 2018 22:43:44 +0000 (17:43 -0500)]
CONTROLLER-1809: De-deplicate extraneous ManagedService updates

For some strange reason, the ComponentProcessor gets an extraneous
duplicate update from the ConfigAdmin when running the netvirt
integration/CSIT which causes it to restart the container b/c it
thinks there was an update. There is no cfg file so both updates
pass a null Properties. Oddly, I do not see this behavior when
installing the toaster feature from the controller karaf.

I added logic to store the last update and only restart if it
changed. In my testing though, the ConfigAdmin does not notify
unless a change actually occurred.

Change-Id: I692dbd7fcaf921b90f828059d6104138c16a0508
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoFix blueprint event handling 44/67444/2
Tom Pantelis [Mon, 22 Jan 2018 22:15:22 +0000 (17:15 -0500)]
Fix blueprint event handling

The BlueprintBundleTracker registers for blueprint events so it can
log when a bundle finished creating its container, successful or not,
and also has logic to restart the container on dependency failure.
However this was  broken due to changes in Aries. You now have to
register a specific BlueprintListener onstead of a general OGSI
EventHandler.

Also this affected the BlueprintContainerRestartServiceImpl as it
relies on blueprint events to now when all bundles have completed
restart.

Change-Id: Ibb121b3995147a56be7f606ed88e9c1f59e3cd4c
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoFix issues with the maven startup-archetype 45/66545/5
Tom Pantelis [Sun, 17 Dec 2017 06:44:59 +0000 (01:44 -0500)]
Fix issues with the maven startup-archetype

- The features-* pom only lists the odl-*-api feature as a
  dependency - it needs to also list the impl feature, and the
  cli and rest features.

- With the above fix, we can uncomment the karaf.localFeature property
  in the karaf/pom so the rest feature is added to the featuresBoot.

- Replaced the hardcoded X in the feature directory names (eg odl-X-api)
  with the variable __artifactId__.  Also removed the <fileSet> elements
  for the hardcoded directory names in the archetype-metadata.xml and
  wildcarded the features <fileSet> so all child poms are included.

- Fixed the "LineLength" checkstyle error in the *CliTestCommand class.
  However this class and *CliCommandsImpl contain imports for the
  generated package bame and thus could be in the incorrect
  lexicographical order for the CustomImportOrder checking.
  I tried @SuppressWarnings but it didn't work for that check
  but I placed the generated imports such that
  "org.opemdaylight.example" will work w/o error :)

- The Integration Test (it/) is commented out in the modules due to CONTROLLER-1811.

- The Integration Test (it/) project has an @Ignore due to CONTROLLER-1810.

- The "it" project didn't build - this was b/c the pom had the incorrect
  <type> for the features-* <dependency>.

- Changed the *IT class name to *Test so it runs with the normal "test"
  command rather than having to run "integration-test" which some users may
  not know to do.

- Removed the left-over maven site generation stuff.

Change-Id: I91c5747bf0defd635649d6f822e84bed810ee344
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoLower verbosity of TransactionProxy logging 33/67433/2
Robert Varga [Mon, 22 Jan 2018 17:01:12 +0000 (18:01 +0100)]
Lower verbosity of TransactionProxy logging

Logging the contents of modifications is quite space-hungry,
drop them to trace level.

Change-Id: Ie63c45b92b03cd2b3a52404d439b35307d356cac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoHandle empty type in NormalizedNode streaming 68/67368/4
Tom Pantelis [Sat, 20 Jan 2018 00:19:03 +0000 (19:19 -0500)]
Handle empty type in NormalizedNode streaming

The yang "empty" type is now represented as
org.opendaylight.yangtools.yang.common.Empty so handle it.

NormalizedNode no longer allows a null value but we still need
to handle NULL_TYPE on input for backwards compatibility. NULL_TYPE
is translated to Empty.

Change-Id: I99b87138d7358d37170cf603d993cd1a4f6a2087
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agorestart-dependents-on-updates=false for CONTROLLER-1809 29/67429/2
Michael Vorburger [Mon, 22 Jan 2018 15:56:43 +0000 (16:56 +0100)]
restart-dependents-on-updates=false for CONTROLLER-1809

Change-Id: If6a1d7c0f22e98b9078404c3fd116a75603dd561
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoEnable archetype self testing 41/65941/5
Michael Vorburger [Mon, 27 Nov 2017 18:24:25 +0000 (19:24 +0100)]
Enable archetype self testing

this requires https://git.opendaylight.org/gerrit/#/c/65940/

see https://jira.opendaylight.org/browse/CONTROLLER-1799

Change-Id: I1cecbad50abf595f164463deb55bdcda797f5a9e
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoEliminate unneeded dependencies on yangtools features 02/67302/1
Robert Varga [Thu, 18 Jan 2018 20:34:10 +0000 (21:34 +0100)]
Eliminate unneeded dependencies on yangtools features

yangtools features are mostly brought in transitively, hence
we do not need to reference them at all. Those that we do need
to pull in are turned into range imports.

Change-Id: I7ef03aa9f4504e2dfa6d73322f59b5b78b80c94c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBump yangtools to 2.0.1 56/67256/1
Robert Varga [Wed, 17 Jan 2018 22:32:47 +0000 (23:32 +0100)]
Bump yangtools to 2.0.1

This picks up the latest fixes, ensuring they are present at deployment
time.

Change-Id: Idef26b28dfb41b24b86ad6a6a8900cc46f94f591
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoDo not inline javax.annotation in config-manager 83/67183/2
Michael Vorburger [Tue, 16 Jan 2018 00:54:13 +0000 (01:54 +0100)]
Do not inline javax.annotation in config-manager

as in If36ced7ad72b19d1240f49c3224ff65c29ee22a0: "We should not be
including a private copy of javax.annotation, as we do not need it."

This one was found by the odl.simple's ClasspathHellDuplicatesCheckRule:

>> jHades - scanning classpath for overlapping jars:

file:/home/vorburger/.m2/repository/org/opendaylight/controller/config-manager/0.8.0-SNAPSHOT/config-manager-0.8.0-SNAPSHOT.jar
overlaps with
file:/home/vorburger/.m2/repository/com/google/code/findbugs/annotations/3.0.0/annotations-3.0.0.jar
- total overlapping classes: 35 - same classloader ! This is an ERROR!

Change-Id: I8b11ed8de2b31aef5e8410f0673a2ed85017287e
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoUncomment @Test in ShardManagerTest 88/67088/2
Tom Pantelis [Fri, 12 Jan 2018 03:18:11 +0000 (22:18 -0500)]
Uncomment @Test in ShardManagerTest

I wanted to run one only test in ShardManagerTest and
commented out @Test for the rest but forgot to uncomment
before submitting.

Change-Id: I81d38b62da50c4118a30b0255ba97ba244b8daa5
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoCSS: handle features with no version 65/67165/3
Stephen Kitt [Mon, 15 Jan 2018 13:44:47 +0000 (14:44 +0100)]
CSS: handle features with no version

When a feature has no version, it can end up interpreted as having
version 0.0.0 (which is the default version). CSS ends up looking for
features with version 0.0.0, which fail to compare with versionless
features. This patch deals with this case explicitly.

Change-Id: I354c7d679e194c38a6aa6883deb2da2b24cda29e
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoDo not inline karaf.features.internal.model 21/65921/7
Robert Varga [Sun, 26 Nov 2017 23:20:42 +0000 (00:20 +0100)]
Do not inline karaf.features.internal.model

Since karaf-4.1.2+ exposes proper model-level indicator of version
non-presence, we do not need to muck around in internals -- leading
to us not inlining ~90KiB of classes.

Also trims duplicate dependencies, as features-core already contains
a copy of felix.utils -- eliminating a bundle warning.

Change-Id: Ic6e3645a56a2e4a3072c50da52a34effe4a0b71a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoDo not inline javax.annotation 60/67160/2
Robert Varga [Mon, 15 Jan 2018 13:58:55 +0000 (14:58 +0100)]
Do not inline javax.annotation

We should not be including a private copy of javax.annotation,
as we do not need it.

Change-Id: If36ced7ad72b19d1240f49c3224ff65c29ee22a0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoReduce log level in FeatureConfigPusher to eliminate noise 84/66584/4
Tom Pantelis [Mon, 18 Dec 2017 21:40:25 +0000 (16:40 -0500)]
Reduce log level in FeatureConfigPusher to eliminate noise

With the upgrade to karaf 4.1.3, we're seeing a lot of these log
messages:

2017-12-18T15:56:14,593 | INFO  | ConfigFeatureListener - ConfigPusher | FeatureConfigPusher              | 72 - config-persister-feature-adapter - 0.8.0.SNAPSHOT | Karaf Feature Service has not yet finished installing feature wrap/0.0.0 (retry 78)

03:16:08.712 [ConfigFeatureListener - ConfigPusher] ERROR
org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher
 - Giving up (after 100 retries) on Karaf featuresService.listInstalledFeatures()
   which has not yet finished installing feature *wrap* 0.0.0

They only occur for system features "jaas-boot" and "wrap". Reduce them to debug.

Change-Id: I8c421f34f9c49d4e5a70649ad9af55e8cffe197d
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoWork around ShardManagerTest.testOnReceiveFindPrimaryForRemoteShard failure 86/67086/1
Tom Pantelis [Fri, 12 Jan 2018 02:01:15 +0000 (21:01 -0500)]
Work around ShardManagerTest.testOnReceiveFindPrimaryForRemoteShard failure

This test fails frequently on jenkins for some reason but passes locally
(I ran it 50 times). It's the last part of the test that fails so I
commented it out for now.

Change-Id: I016f112bf0e58fe0e49498453557be4453656ae9
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoMigrate WordUtils users 01/65901/4
Robert Varga [Sat, 25 Nov 2017 01:06:30 +0000 (02:06 +0100)]
Migrate WordUtils users

WordUtils is being moved to commons-text, move to using that.

Change-Id: I23a899c955071140c4e1948cf4bfa998f7bd1218
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoBump to odlparent 3.0.2 85/66485/4
Tom Pantelis [Thu, 14 Dec 2017 23:29:22 +0000 (18:29 -0500)]
Bump to odlparent 3.0.2

Change-Id: Ifb16521edc9fa7209c0af8e13745c6b5611d77b7
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoAdjust to yangtools-2.0.0 changes 75/64175/42
Robert Varga [Wed, 11 Oct 2017 19:31:07 +0000 (21:31 +0200)]
Adjust to yangtools-2.0.0 changes

Change-Id: Ib86747e5ed19c0c00bb46b8d7e4936f4d90c4364
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoBump yangtools to 2.0.0 74/64174/26
Robert Varga [Wed, 11 Oct 2017 18:54:53 +0000 (20:54 +0200)]
Bump yangtools to 2.0.0

This bumps odlparent to 3.0.1 and yangtools to 2.0.0. Also fixes
references to features, so that the build reactor is consistent.

Compilation fixes are addressed in a follow-up patch.

Change-Id: I24f9997c2ec22861e674b74fb01d43f783e3dbc1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoPrevent non-voting member from becoming entity owner 30/66830/2
Tom Pantelis [Tue, 2 Jan 2018 14:59:07 +0000 (09:59 -0500)]
Prevent non-voting member from becoming entity owner

The use case for a non-voting member is as a backup node so
it makes sense not to allow a non-voting member to become an
entity owner. Also, when a voting state change occurs,
ownership is re-evauated for all entities.

Change-Id: Id8d75c4ae2f91be10aa20e97bdc4448776ae4445
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
6 years agoregister RemoteRpcRegistryMXBean 35/66635/5
wusandi [Wed, 20 Dec 2017 07:09:12 +0000 (15:09 +0800)]
register RemoteRpcRegistryMXBean

The RemoteRpcRegistryMXBean had not registered because of code refactoring.
I'm sure that it had been removed from one of history commits,
But I think it should be added back to support jmx for query rpcs
when one of rpcs breaks down.

Change-Id: I506ed5c25c7615b8bb7ac9c0102bf671ff40bb78
Signed-off-by: wusandi <wusandi@163.com>
6 years agoCompare member names in leader identifier and member event instead of by leader ident... 98/66698/1
YIN Kangqian [Thu, 21 Dec 2017 05:44:54 +0000 (13:44 +0800)]
Compare member names in leader identifier and member event instead of by leader identifier contains member name.

ShardManager#markMemberUnavailable/markMemberAvailable now decide whether current leader shards
are on the unavailable/available member by the leader identifier contains the member name.
This way will make a wrong decision when the member name on which leader shard reside contains
the member name which becomes unavailable/available.

New added UT ShardManagerTest#testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable
captures this radical case. And two lines change in ShardManager will pass this UT.

Change-Id: Ib7cd02316c192aeaa8cdac14ff9ece0f872386a6
Signed-off-by: YIN Kangqian <yin.kangqian@zte.com.cn>
6 years agoFix checkstyle reported by odlparent-3.0.0 93/65593/16
Robert Varga [Thu, 16 Nov 2017 02:34:13 +0000 (03:34 +0100)]
Fix checkstyle reported by odlparent-3.0.0

Change-Id: I08c548fbbbef8527ad7b037b0def33d3c1c09bf6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
6 years agoConcurrentDOMDataBroker LOG debug instead of error 62/66362/1
Michael Vorburger [Mon, 11 Dec 2017 22:24:39 +0000 (23:24 +0100)]
ConcurrentDOMDataBroker LOG debug instead of error

for "Tx: {} Error during phase {}, starting Abort"

see CONTROLLER-1802 and NETVIRT-916 for the full background story to
why this will help reduce confusion when we analyze logs.

Change-Id: I7f791bc92d3c22d96462381d6b966755134647d4
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoFix wrong @author: tag which Java 9 JavaDoc chokes on 68/66268/2
Michael Vorburger [Wed, 6 Dec 2017 11:17:30 +0000 (12:17 +0100)]
Fix wrong @author: tag which Java 9 JavaDoc chokes on

see https://stackoverflow.com/questions/47661667/failed-to-build-the-sal-distributed-datastore-error-while-generating-javadoc-in

Change-Id: I6cda4ee59da49d12b1e9cf7613a264d2e5213fe2
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoFix bug CONTROLLER-1798. 86/66186/2
YIN Kangqian [Mon, 4 Dec 2017 02:18:31 +0000 (10:18 +0800)]
Fix bug CONTROLLER-1798.

Updated peer address on shard in ShardManager#updateSchemaContext
for every existing peer memeber to avoid missing sending PeerAddressResolved
and PeerUp to shard while UpdateSchemaContext comes after MemberUp.

Change-Id: I0758e489a189f82180ca6885987ec99f1e5712c7
Signed-off-by: YIN Kangqian <yin.kangqian@zte.com.cn>
6 years agoCorrect logging in FrontendClientMetadataBuilder 10/65810/2
Martin Dindoffer [Tue, 21 Nov 2017 17:43:01 +0000 (18:43 +0100)]
Correct logging in FrontendClientMetadataBuilder

Change-Id: I7851d72119607dbb354e213e82091354792b063b
Signed-off-by: Martin Dindoffer <martin.dindoffer@pantheon.tech>
6 years agoDrop obsolete Maven site configuration 35/65935/2
Stephen Kitt [Mon, 27 Nov 2017 17:09:23 +0000 (18:09 +0100)]
Drop obsolete Maven site configuration

See
https://lists.opendaylight.org/pipermail/odlparent-dev/2017-November/001492.html

Change-Id: I24ce5c864f3465bc44a57b33f14d76dd18f2e0cc
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoTracing Transaction wrappers delegate equals/hashCode/equals 08/65808/2
Michael Vorburger [Tue, 21 Nov 2017 17:13:06 +0000 (18:13 +0100)]
Tracing Transaction wrappers delegate equals/hashCode/equals

to fix IllegalStateException due to DOMBrokerTransactionChain !equals
TracingTransactionChain (only affected odl-mdsal-trace for
trace:transaction anyway)

see https://jira.opendaylight.org/browse/CONTROLLER-1792

Change-Id: I079ff9e99edfd55bec2acbe1984a5c2b7667c2de
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
6 years agoAllow PacketException to store the cause 37/65837/2
Stephen Kitt [Wed, 22 Nov 2017 10:39:30 +0000 (11:39 +0100)]
Allow PacketException to store the cause

This avoids callers’ losing the original exception.

Change-Id: I99f11dd6866670229f8e3d2aa6556f540369de19
Signed-off-by: Stephen Kitt <skitt@redhat.com>
6 years agoMove karaf up a directory 50/65550/2
Ryan Goulding [Wed, 15 Nov 2017 15:23:47 +0000 (10:23 -0500)]
Move karaf up a directory

Historically, karaf distribution was stored in the "karaf/opendaylight-karaf"
module.  Similarly, there were modules like "karaf/opendaylight-karaf-empty"
and "karaf/karaf-parent".  These artifacts have been moved to odlparent,
so it no longer makes sense to keep an aggregator.  This change removes
the karaf-aggregator for controller.

Change-Id: I07499b2a7d57cd9130e3d653545d3aa6c1b72ece
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
6 years agoFix checkstyle issues in module sal-dom-broker 77/64277/4
David Suarez [Tue, 17 Oct 2017 09:56:07 +0000 (11:56 +0200)]
Fix checkstyle issues in module sal-dom-broker

It includes enforcement in pom.xml

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

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

so that it can be removed from odlparent dependencyManagement
in I0ce0e4b7ad54e171c061e1bb91d568b25e9d1145
for https://jira.opendaylight.org/browse/INFRAUTILS-19

see https://lists.opendaylight.org/pipermail/odlparent-dev/2017-November/001460.html

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

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

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

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

Change-Id: Idbaa59aa39c2863ec76859b2ffa448b50890fd55
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>