controller.git
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 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>
2 years agoMDSAL-107: Fix pre-existing data notification for wildcarded DTCL 42/64742/3
Valentin Mayamsin [Fri, 16 Oct 2015 21:38:02 +0000 (14:38 -0700)]
MDSAL-107: Fix pre-existing data notification for wildcarded DTCL

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

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

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

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

 *removed hardcoded dependecies on OSGi
  *removed EntityOwnerSelectionStrategyConfigReader + test
 *set up properties for shards in DistributedEntityOwnershipService
  via blueprint
 *read config from properties via reflection from object type
  org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder
 *allowed direct set up properties

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

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

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

  * remove hardcoded dependecies on OSGi
    * moved to blueprint

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

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

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

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

Some other minor changes fix checkstyle/sonar issues.

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

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

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

These come from squid:

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

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

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

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

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

+ Also fix ParenPad violations.

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

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

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

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

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

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

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

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

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

this came up during https://git.opendaylight.org/gerrit/#/c/63372/

a bit similar (but otherwise unrelated) to my earlier
https://git.opendaylight.org/gerrit/#/c/63135/

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

in case of OptimisticLockFailedException, one should do:

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

and not if (tries - 1 < 0 ).

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

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

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

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

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

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

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

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

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

Change-Id: I8299eb54a347d132f0d19dfb39c8fb52366049f2
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 years agosal-binding-dom-it: use lambdas 79/57179/6
Stephen Kitt [Tue, 16 May 2017 15:50:51 +0000 (17:50 +0200)]
sal-binding-dom-it: use lambdas

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

Change-Id: Id3c04094ba78356b59e3faaf3ae7bb9008146f5a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 years agosal-dom-broker-config: use lambdas 87/57187/4
Stephen Kitt [Tue, 16 May 2017 15:51:32 +0000 (17:51 +0200)]
sal-dom-broker-config: use lambdas

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

Change-Id: Iaf552c1e280034f8a465b46b9092a7df0cec5409
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 years agosal-binding-api: use lambdas 77/57177/5
Stephen Kitt [Tue, 16 May 2017 15:49:30 +0000 (17:49 +0200)]
sal-binding-api: use lambdas

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

Change-Id: I57045a8cfb4dc788eb0d687eceb49ca54e6dc7c8
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 years agoconfig-manager-facade-xml: use lambdas 66/57166/4
Stephen Kitt [Tue, 16 May 2017 15:48:20 +0000 (17:48 +0200)]
config-manager-facade-xml: use lambdas

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

Change-Id: I95cb63a6d919392fbc5d169de6870f81e05761be
Signed-off-by: Stephen Kitt <skitt@redhat.com>
2 years agoUse foreach loops 81/57081/3
Stephen Kitt [Mon, 15 May 2017 15:54:41 +0000 (17:54 +0200)]
Use foreach loops

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

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

as discussed on https://git.opendaylight.org/gerrit/#/c/63120/

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

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

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

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

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

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

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

Fix checkstyle issues to enforce it.

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

Fix checkstyle issues to enforce it.

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

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

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

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

Fix checkstyle issues to enforce it.

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

This method is not referenced from anywhere, remove it.

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

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

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

Fix checkstyle issues to enforce it.

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

Includes migration to Karaf 4 features, as per
https://wiki.opendaylight.org/view/Karaf_4_migration

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

This also contributes a basis for future automated self testing; see also
http://blog2.vorburger.ch/2016/05/how-to-make-maven-archetype-plugin.html,
but this is skipped in this change, because while it works great locally,
it fails for some strange reason related to SFT on (only) Jenkins.

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

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

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

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

* karaf.localFeature which breaks during build self test

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

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

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

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

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

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

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

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

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

yangtools.binding.data -> mdsal.binding.dom

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

Fix checkstyle issues to enforce it.

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

Fix checkstyle issues to enforce it.

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

Fix checkstyle issues to enforce it.

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

[1]
https://google.github.io/guava/releases/19.0/api/docs/com/google/common/util/concurrent/MoreExecutors.html#sameThreadExecutor()

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

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

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

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

log:set ERROR org.opendaylight.controller.md.sal.trace.dom.impl

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: Id2eb1e76a8658e837166b227a30cd49ee665c258
Signed-off-by: Michael Vorburger <vorburger@redhat.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.