controller.git
3 years agoBump versions by x.y.(z+1) 92/94192/1 stable/magnesium
jenkins-releng [Fri, 11 Dec 2020 08:52:52 +0000 (08:52 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I4a0b2c40ac50683f2477a413aec2b8bbcbb1925f

3 years agoMake sure to clear candidate from memory 19/93519/2
Tomas Cere [Tue, 3 Nov 2020 11:38:04 +0000 (12:38 +0100)]
Make sure to clear candidate from memory

The candidate needs to be cleared even when processing
replicated candidate(ie on a follower) as there is no need
to keep it deserialized in memory

JIRA: CONTROLLER-1928
Change-Id: I1403dbe27def5e0040a8d9f145a92ac06aae9d1e
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit 5a824a836a00ff21a855d7339a2fa9b64678db52)

3 years agoBump upstream versions 95/93795/2
Robert Varga [Thu, 12 Nov 2020 11:41:21 +0000 (12:41 +0100)]
Bump upstream versions

Pick up:
- odlparent-6.0.12
- yangtools-4.0.14
- mdsal-5.0.16

Change-Id: I87ee99cbb1bdb94e88fb3d0208bcdd6ef2841a61
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoExpose AskTimeoutException counter from DatastoreInfoMXBean 84/93284/1
Robert Varga [Thu, 22 Oct 2020 21:38:04 +0000 (23:38 +0200)]
Expose AskTimeoutException counter from DatastoreInfoMXBean

This is a natural place to keep track of all exceptions which
happen in datastore context. Hook an onComplete() to each future
which goes by and update the counter.

JIRA: CONTROLLER-1963
Change-Id: Ib208b377e1ab533993597660228b5fc87919e75b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 9045f6fc943e9794055463442dcfa9bce64b68d3)

3 years agoMigrate SnapshotManagerTest 79/93279/1
Robert Varga [Thu, 22 Oct 2020 18:51:32 +0000 (20:51 +0200)]
Migrate SnapshotManagerTest

Use MockitoJUnitRunner to initialize mocks, which shows we have
unneeded stubbings and that we are lacking two stubs.

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

3 years agoMigrate ReplicatedLogImplTest 78/93278/1
Robert Varga [Thu, 22 Oct 2020 18:47:33 +0000 (20:47 +0200)]
Migrate ReplicatedLogImplTest

Use MockitoJUnitRunner to initialize mocks, which shows we have
unneeded stubbings.

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

3 years agoDo not reset datasize after a fake snapshot 77/93277/1
tadei.bilan [Mon, 27 Jul 2020 10:18:29 +0000 (13:18 +0300)]
Do not reset datasize after a fake snapshot

If we reset dataSize from SnapshotManager's fake snapshot, we would
not have correctly accounted for on-disk size.

Fix this by exposing a simple knob, which allows suppressing dataSize
update during snapshotCommit().

JIRA: CONTROLLER-1957
Change-Id: I553ddb523ac8504892cc5353bfe4b002c25436ce
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit ff29db5dc6012f77bbe53f57ddce929b0de093b3)

3 years agoLog replicated log dataSize changes 76/93276/1
Robert Varga [Thu, 22 Oct 2020 18:10:01 +0000 (20:10 +0200)]
Log replicated log dataSize changes

This is a bit of critical state, make sure we recalculate it atomically
and log its changes.

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

3 years agoReformat AbstractReplicatedLogImpl 75/93275/1
Robert Varga [Thu, 22 Oct 2020 17:57:54 +0000 (19:57 +0200)]
Reformat AbstractReplicatedLogImpl

'final' on arguments, remove unnecessary type for empty list, add
a @NonNull return annotation.

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

3 years agoClean up AbstractReplicatedLogImplTest 74/93274/1
Robert Varga [Thu, 22 Oct 2020 17:54:11 +0000 (19:54 +0200)]
Clean up AbstractReplicatedLogImplTest

Use static imports for Assert methods, add final qualifiers.

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

3 years agoCorrect javadoc reference 63/92963/1
Robert Varga [Mon, 12 Oct 2020 13:23:55 +0000 (15:23 +0200)]
Correct javadoc reference

We should not be referencing UntypedActor, but rather AbstractActor.

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

3 years agoOdl-jolokia package superfluous artifacts 34/93034/1
Vladyslav Marchenko [Tue, 13 Oct 2020 06:38:19 +0000 (09:38 +0300)]
Odl-jolokia package superfluous artifacts

From /odl-jolokia/target/feature/feature.xml:
wrap:mvn: jar content is already in present in jolokia-osgi

JIRA: CONTROLLER-1961
Change-Id: I3d689cdedb002f9d97937671ebfe38127e1095e0
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
(cherry picked from commit f3c17d0d7c3e356f60f47ef460258d0373512acf)

3 years agoAdd direct in-memory journal threshold 74/92274/1
tadei.bilan [Tue, 21 Jul 2020 09:24:09 +0000 (12:24 +0300)]
Add direct in-memory journal threshold

Some deployments benefit from placing an absolute numeric limit
on the retained memory. Introduce a new tunable, which overrides
the usual percentange limit.

JIRA: CONTROLLER-1956
Change-Id: I688e226b173386765bea74931b6aaf617bda30a8
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 7cb260aeb0738104e3bee8a086de9e2e5f77b7e0)

3 years agoBump versions by x.y.(z+1) 91/91991/1
jenkins-releng [Mon, 10 Aug 2020 07:29:35 +0000 (07:29 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I0ba3e8cb6141f55c75c8e42a526923bd6a99038a

3 years agoBump odlparent/yangtools/mdsal to 6.0.11/4.0.13/5.0.14 49/91549/1
Robert Varga [Wed, 22 Jul 2020 18:03:18 +0000 (20:03 +0200)]
Bump odlparent/yangtools/mdsal to 6.0.11/4.0.13/5.0.14

Pick up latest updates from upstream.

Change-Id: Ib5e26c6ff094b04a7e96da1b39624e5173827268
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not fail on warnings for docs-linkcheck 48/91448/1
Thanh Ha [Fri, 10 Jul 2020 14:57:46 +0000 (10:57 -0400)]
Do not fail on warnings for docs-linkcheck

This is a workaround due to sphinx-tabs being incompatible with the
Sphinx linkchecker which throws a warning. We mainly use linkchecker
to catch broken links so we don't really need to fail on warnings as
the main "docs" builder will still fail for warning level issues so
this is a reasonable workaround.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: If3e7cea79528ed31fadcea7c7a4c4e13315d1fcd

3 years agoFix a sonar-reported bug 88/88888/2
Robert Varga [Sat, 4 Apr 2020 08:10:05 +0000 (10:10 +0200)]
Fix a sonar-reported bug

Calling finalize first and then calling shutdownNow() does not
really make sense. Invert the calls.

Change-Id: I1d8164d4c433805cf4cda779e190c7ae32829099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal to 6.0.10/4.0.12/5.0.13 81/91381/1
Robert Varga [Fri, 17 Jul 2020 15:20:20 +0000 (17:20 +0200)]
Bump odlparent/yangtools/mdsal to 6.0.10/4.0.12/5.0.13

Pick up latest updates from upstream.

Change-Id: Iac312aa3e08ac09331d505a0301655eb1fa8ac3b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not deploy opendaylight/model pom 85/91085/1
Robert Varga [Fri, 10 Jul 2020 09:14:54 +0000 (11:14 +0200)]
Do not deploy opendaylight/model pom

This is a pure aggregator, make sure we do not publish it.

Change-Id: Icf98fe8b67c1ad3923e78b1aa9bb7e644f78360b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix intermittent IT hangs 59/91059/1
Robert Varga [Fri, 10 Jul 2020 06:38:22 +0000 (08:38 +0200)]
Fix intermittent IT hangs

Integration tests may hang due to pax-exam/surefire interaction.
Switch to TCP communication channel to fix these.

Change-Id: Ic4713ff63b073fdf03b8ee072d5a4ccaa20bf48e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoBump odlparent/yangtools/mdsal 46/91046/1
Robert Varga [Fri, 10 Jul 2020 04:59:05 +0000 (06:59 +0200)]
Bump odlparent/yangtools/mdsal

This adopts the following versions:
- odlparent-6.0.9
- yangtools-4.0.11
- mdsal-5.0.12

Change-Id: I134b50eff825f94201bd07b8e9096135e4e0d2f6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoEnable overwrite test suite 74/90774/1
Robert Varga [Thu, 25 Jun 2020 16:57:34 +0000 (18:57 +0200)]
Enable overwrite test suite

With data being split up correctly between shards, we can re-enable
the test suite for snapshot triggers.

JIRA: CONTROLLER-1913
JIRA: CONTROLLER-1950
Change-Id: Ibda02648682aee03cf4c5a0275f705d79dbe6b1c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit b21572e7fcdc926c7839f2b936eb3f623304fd6c)

3 years agoSplit modifications on datastore root 73/90773/1
Robert Varga [Thu, 25 Jun 2020 14:31:24 +0000 (16:31 +0200)]
Split modifications on datastore root

When we are dealing with modifications, we must not assume they are
not spanning shards. Specifically, we need to make sure we split
data when the user is targeting datastore root, as for those cases
we need to split top-level containers to their appropriate shards,
not the default shard.

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

3 years agoSplit TransactionChainProxy.combineWithPriorReadOnlyTxFutures() 54/90754/1
Robert Varga [Thu, 25 Jun 2020 21:35:55 +0000 (23:35 +0200)]
Split TransactionChainProxy.combineWithPriorReadOnlyTxFutures()

There is a common and uncommon path here, where we expect majority
of high-performance uses to short-circuit to no combining at all.

Split that simple case out, so that we aid JIT inlining and also
know in profiling runs which branches are usually taken.

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

3 years agoAdd a missing space 33/90733/1
Robert Varga [Fri, 26 Jun 2020 10:43:50 +0000 (12:43 +0200)]
Add a missing space

Logging message was missing a space here, fix that up.

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

3 years agoSimplify LocalTransactionContext 32/90732/1
Stephen Kitt [Fri, 26 Jun 2020 09:31:19 +0000 (11:31 +0200)]
Simplify LocalTransactionContext

... by reverting to a variant of the previous executeModification()
implementation.

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

3 years agoRefactor TransactionContext.executeModification() 31/90731/1
Robert Varga [Thu, 25 Jun 2020 19:21:07 +0000 (21:21 +0200)]
Refactor TransactionContext.executeModification()

Shift allocation of modification objects to RemoteTransactionContext,
so that local and noop cases do not end up allocating remoting objects.

JIRA: CONTROLLER-1951
Change-Id: Iedddb54aa9e55ca0e4352ecb176077a25ef643f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 5b69c8e66b12a29a36457955cac4a45affd7c73f)

3 years agoMove checking/logging out of executeModification() 04/90704/2
Robert Varga [Thu, 25 Jun 2020 13:58:43 +0000 (15:58 +0200)]
Move checking/logging out of executeModification()

We will need specialized methods to deal with modifications,
similar to what we are doing for read(). As a first step, split
out common bits. This inlining has the added benefit of not touching
class reflection data.

JIRA: CONTROLLER-1950
Change-Id: I88030331ad8fe9299e8e824e18571047c87c90c6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 576924996622ae1d4326363830001d529882a431)

3 years agoClean up TransactionProxy a bit 03/90703/2
Robert Varga [Thu, 25 Jun 2020 13:53:30 +0000 (15:53 +0200)]
Clean up TransactionProxy a bit

An extra space and a superfluous else block.

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

3 years agoFix NoSuchElementException in toString() 92/90492/1
Robert Varga [Fri, 26 Jun 2020 10:33:43 +0000 (12:33 +0200)]
Fix NoSuchElementException in toString()

Original patch missed the fact that an empty set will throw, fix
that up.

Change-Id: I2d0588ec0499475935d285b3be6db299a9d4d525
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd an option to trigger snapshot creation on root overwrites 55/89755/6
Tibor Král [Fri, 21 Feb 2020 13:57:41 +0000 (14:57 +0100)]
Add an option to trigger snapshot creation on root overwrites

In some cases (such as DAEXIM import), it does not necessarily
make sense to retain previous data in the journal, as all of it
has been superseded.

JIRA: CONTROLLER-1913
Change-Id: I5d634faac06e6764a417c23e88c728373b900924
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit bb248f15d352cdd69e53ff7756fcb2c62cdc3eac)

3 years agoAdd option to disable default ActorSystemQuarantinedEvent handling 83/90483/1
Tibor Král [Thu, 11 Jun 2020 08:28:55 +0000 (10:28 +0200)]
Add option to disable default ActorSystemQuarantinedEvent handling

The default reaction to ThisActorSystemQuarantinedEvent is to
restart the entire Karaf container. However some users may want
to process the event differently.

JIRA: CONTROLLER-1949
Change-Id: Id65d31749dd97cb067611f7cfe4df76a6fe12204
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd UnsignedLongRangeSet.toString() 78/90478/1
Robert Varga [Mon, 15 Jun 2020 09:17:31 +0000 (11:17 +0200)]
Add UnsignedLongRangeSet.toString()

This makes the rangeset a wee bit more useful for debugging purposes.

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

3 years agoApply a workaround for the isolation of quarantined node 76/90476/1
Tejas Nevrekar [Thu, 4 Jun 2020 12:44:23 +0000 (18:14 +0530)]
Apply a workaround for the isolation of quarantined node

Listen to the AssociationErrorEvent in addition to
the ThisActorSystemQuarantinedEvent so that in cases
like isolate followed by unisolate, the quarantine
restart is triggered.

JIRA: CONTROLLER-1941
Change-Id: I937a9411c90fbbbaad73769efbc4e996369448a8
Signed-off-by: Tejas Nevrekar <tejas.nevrekar@gmail.com>
(cherry picked from commit 0df6660a561209abca5f54bc265d5b1e52ad91d5)

3 years agoAllow incremental recovery 69/90269/1
Tibor Král [Wed, 22 Jan 2020 11:53:41 +0000 (12:53 +0100)]
Allow incremental recovery

Expose configuration knob in DatastoreContext to specify the
amount of recovered journal entries after which a Snapshot should
be taken and the journal purged.

JIRA: CONTROLLER-1915
Change-Id: I4b20a0abe0329965ca5ac1ab5df7d9ca8480cfb2
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
(cherry picked from commit 33877f41ffc3f8eb36ad8490315419b90817d26e)

3 years agoAdd sender actor to the ForwardingDataTreeChangeListener 58/90258/1
Tibor Král [Thu, 4 Jun 2020 16:50:51 +0000 (18:50 +0200)]
Add sender actor to the ForwardingDataTreeChangeListener

The ForwardingDataTreeChangeListener is created when a shard
registers new listener. It then sends dataTreeChanges to said listener
but doesn't specify the sender. The RootListenerActor however needs
to know which shard produced the DataTreeChanged message.

Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Change-Id: I4971cfaefa10c3136e0ddcc350ec7e00e68e6b42

3 years agoFix OpsManager registry instantiation 92/89992/1
Robert Varga [Wed, 3 Jun 2020 13:51:54 +0000 (15:51 +0200)]
Fix OpsManager registry instantiation

We have a day-zero bug with actions, as OpsManager ends up
instantiating the wrong actor -- hence we have two RpcRegistry
instances and no ActionRegistry instances.

JIRA: CONTROLLER-1943
Change-Id: I3b374454af3225cf13d5e23e4fb6744bf3f9ed99
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd odlparent docs reference 39/90139/1
Robert Varga [Sat, 30 May 2020 11:12:41 +0000 (13:12 +0200)]
Add odlparent docs reference

In cas ewe end up cross-referencing into odlparent infra, make sure
we have accurate links.

Change-Id: Ia9ae4f31c6e94f90aa504bf970e933914b367d18
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoAdd missing images from the docs project 91/89891/1
Thanh Ha [Mon, 25 May 2020 23:09:09 +0000 (19:09 -0400)]
Add missing images from the docs project

Looks like we forgot to migrate these images when we moved the
controller docs over.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Id322b36488ed1b6ddcad2a666ebe5e2148627479
(cherry picked from commit 758ed1e7d3eae1fd3354bc70ad08ddde7c44f4fa)

3 years agoAdd documentation about per-shard settings 90/89890/2
Robert Varga [Mon, 25 May 2020 17:44:44 +0000 (19:44 +0200)]
Add documentation about per-shard settings

Previous implementation of per-shard datastore properties did not
document this ability. Make sure we document it and properly test it.

JIRA: CONTROLLER-911
Change-Id: I5be13c73e76e612a93620710e6a00b78d9dee216
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoDo not bump follower term while it is isolated 81/89881/2
Tomas Cere [Fri, 22 May 2020 11:11:04 +0000 (13:11 +0200)]
Do not bump follower term while it is isolated

When a follower gets into a state that its isolated(ie cannot reach either peer)
it starts bumping its term every election timeout. Once the cluster heals it
would then disrupt the cluster because it has a higher term then the healthy part.
We can avoid this by not triggering new elections on followers that cannot
reach other peers while they are unreachable.

JIRA: CONTROLLER-1935
Change-Id: I8ee9f333740637ba5569287d405540f374bbc4bc
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit d3d04140ac3d7a2a90a3b953cc4ea27fca2bfc32)

3 years agoAdd tests for new RootDataTreeChangeListenerProxy and Actor 88/89888/1
Tibor Král [Thu, 21 May 2020 16:27:08 +0000 (18:27 +0200)]
Add tests for new RootDataTreeChangeListenerProxy and Actor

Listening on root with multiple shards is not tested anywhere,
add some test coverage.

JIRA: CONTROLLER-1932
Change-Id: Ie0d94f2d9b90869a140b73d85f1696df712fad25
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 4152b84fbf3d8d5436467f96076c6fb6a0f2ae4a)

3 years agoAdd support for root DTCL listening on all shards in DS 39/88939/4
Robert Varga [Tue, 19 May 2020 14:37:47 +0000 (16:37 +0200)]
Add support for root DTCL listening on all shards in DS

Devide DTCLProxy into DTCLSingleShardProxy, DTCLMultiShardProxy and
DTCLPrefixShardProxy to address the different registration mechanisms
used in all three cases.

JIRA: CONTROLLER-1932
Change-Id: I48732577f26fa5844b69a2feaddb02fe53909da7
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
3 years agoFix DeleteEntries persisting with wrong index 75/89875/1
tadei.bilan [Tue, 12 May 2020 14:03:37 +0000 (17:03 +0300)]
Fix DeleteEntries persisting with wrong index

During persisting we delete entries, so in case of persisting DeleteEntries with adjusted index,
 index is being adjusted twice, that results in additional entries being deleted during recovery.

JIRA: CONTROLLER-1934

Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Change-Id: Ib326f02630281ed52982dab2f48c01503b791ef7
(cherry picked from commit 45481ba83a3f698f1127f15b02f4c5aaa4081ad5)

3 years agoBump versions by x.y.(z+1) 84/89784/1
jenkins-releng [Fri, 15 May 2020 01:38:43 +0000 (01:38 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I826b0bc76ce159d9592c5ea0500d46b54d5a3515

3 years agoRevert "Switch default persistence to segmented-journal" 54/89554/1
Jamo Luhrsen [Fri, 1 May 2020 21:25:45 +0000 (21:25 +0000)]
Revert "Switch default persistence to segmented-journal"

This reverts commit 8fc271e2d166f9d9abe54bc8915798d213d536bb.

Reason for revert: causes regression in Magnesium SR1 release

Change-Id: Id7118f44b2c8b04a595f1727842cdd90ca6f16f4
Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
3 years agoSwitch default persistence to segmented-journal 86/87586/6
Robert Varga [Tue, 11 Feb 2020 17:26:32 +0000 (18:26 +0100)]
Switch default persistence to segmented-journal

We want to migrate away fro leveldb persistence, this switches
the default persistence being used for new deployments to our own
segmented-journal plugin.

JIRA: CONTROLLER-1411
Change-Id: I9db4e8115ac8f31c5c331c194de1ff08a674af97
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent/yangtools/mdsal 93/89193/4
Robert Varga [Tue, 21 Apr 2020 10:33:00 +0000 (12:33 +0200)]
Bump odlparent/yangtools/mdsal

This adopts the following versions:
- odlparent-6.0.6
- yangtools-4.0.8
- mdsal-5.0.10

Change-Id: I8bf5b1f58cc51c0cb289adba76119bf19910e53b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate Assert.assertThat() 03/88903/2
Robert Varga [Fri, 3 Apr 2020 15:42:46 +0000 (17:42 +0200)]
Migrate Assert.assertThat()

This method has been migrated, make sure we use its new place.

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

4 years agoBump atomix to 3.1.7 55/88855/2
Robert Varga [Thu, 2 Apr 2020 13:16:41 +0000 (15:16 +0200)]
Bump atomix to 3.1.7

No changelogs, but the following issue is fixed:
https://github.com/atomix/atomix/issues/978

Change-Id: Ib9248d7b9cc5e50d1789778b18650f5b7804e802
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse JavaConverters to eliminate Scala compat workarounds 54/88854/2
Robert Varga [Thu, 2 Apr 2020 12:59:50 +0000 (14:59 +0200)]
Use JavaConverters to eliminate Scala compat workarounds

We are forced to use two workarounds to deal with Scala class
hierarchy. Use JavaConverters to convert to the appropriate
implementation, which does what we need it to do.

Change-Id: Ib66b73f8d67dd1084328c8b2bc6f2f29a199a3ba
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix checkstyle 83/88783/2
Robert Varga [Thu, 2 Apr 2020 12:26:12 +0000 (14:26 +0200)]
Fix checkstyle

Upgraded checkstyle is finding some violations, fix them up.

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

4 years agoMigrate OSGI compendium reference 84/88784/1
Robert Varga [Thu, 2 Apr 2020 12:24:03 +0000 (14:24 +0200)]
Migrate OSGI compendium reference

OSGi R6 has moved the artifact declaration, make sure we do not use
the R5 one.

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

4 years agoFixup "Leader should always apply modifications as local" regression 09/88309/1
Tomas Cere [Wed, 12 Feb 2020 12:23:22 +0000 (13:23 +0100)]
Fixup "Leader should always apply modifications as local" regression

This reintroduces the original commit:
 e66759266dc43d5f58b2837aca5047b42c205e4a
and fixes up the two bugs it introduced.

First one didn't account for the fact that the new leader might have not
tracked forwarded transactions from the previous leader which would
be ignored. Previously not tracked transactions are now applied
normally on the new leader.

Second issue was that we started keeping around deserialized
candidates in memory in each CommitTransactionPayload even after they
were applied and no longer needed.During the final use of the
candidate in ShardDataTree the candidate is now clearedduring
CommitTransactionPayload.acquireCandidate() which allows the
deserialized candidate to be cleared by GC.

JIRA: CONTROLLER-1927
JIRA: CONTROLLER-1928
Change-Id: I47876d4d29a8e9b6b9283d70e47108f3dc2ed3ee
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
(cherry picked from commit 78d3eea7d730f07f89c36fe24afbf51781a21bc3)

4 years agoDo not use passive connections 04/88304/1
Robert Varga [Mon, 16 Mar 2020 11:45:48 +0000 (12:45 +0100)]
Do not use passive connections

We are seeing issues with passive connections, pointing towards
switching them off (or migrate to Artery TCP, which is one-way).

As Artery TCP has memory leaks before 2.5.29, opt to disable passive
connections.

JIRA: AAA-195
Change-Id: Ia9779ad6a7d9d2bc73306d0968e5d22553450fac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 8da08c9f008d371c491cf6b35494ca36c2ebdcb9)

4 years agoBump versions by x.y.(z+1) 16/88516/1
jenkins-releng [Thu, 19 Mar 2020 11:59:37 +0000 (11:59 +0000)]
Bump versions by x.y.(z+1)

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: I62240dd92422e9f01f058e90ad4ecfbc108ae319

4 years agoExpose more fine-grained shutdown methods 55/87955/1
Robert Varga [Fri, 21 Feb 2020 05:28:55 +0000 (06:28 +0100)]
Expose more fine-grained shutdown methods

We want to the user to be in control of timing of shutdown, expose
appropriate methods to do that.

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

4 years agoPropagate TimeoutException when ActorSystem fails to terminate 54/87954/2
Tibor Král [Thu, 6 Feb 2020 11:19:42 +0000 (12:19 +0100)]
Propagate TimeoutException when ActorSystem fails to terminate

ActorSystemProviderImpl waits 10s for the ActorSystem to terminate.
If this timeout is reached propagate the resulting TimeoutException
so the caller knows something went wrong.

JIRA: CONTROLLER-1929
Change-Id: I6518600e2930e3a0a955215b24a9b3074730ff64
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
(cherry picked from commit e8215aef8cf2475512d7601fdaebcb1294e93fc7)

4 years agoUpdate .gitreview to stable/magnesium 81/87881/1
jenkins-releng [Tue, 18 Feb 2020 22:05:26 +0000 (22:05 +0000)]
Update .gitreview to stable/magnesium

Signed-off-by: jenkins-releng <jenkins-releng@opendaylight.org>
Change-Id: If839bc4823a9e2fde49c87ee6ee61e18c9da1ea2

4 years agoRevert "Leader should always apply modifications as local" 52/87452/1
Robert Varga [Wed, 5 Feb 2020 14:13:46 +0000 (15:13 +0100)]
Revert "Leader should always apply modifications as local"

This reverts commit 9b319f491af1c65705b69e8a182aab5006a2f959, which
broke both upgrade-recovery and pre-leader entry application. We
will re-visit the patch and try again.

JIRA: CONTROLLER-1927
JIRA: CONTROLLER-1928
Change-Id: I23e4264cf6a20e9d2369d44005c31db1ef7635c9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCache full datastore context 71/87071/2
Robert Varga [Tue, 21 Jan 2020 22:31:31 +0000 (23:31 +0100)]
Cache full datastore context

While the context is small, it is also invariant across a number of
test cases, each of which is instantiating it. Just share one
instance across all tests to speed them up.

While we are at it, we switch to using EffectiveModelContext to
ease our future migration.

Change-Id: I29a89e93903e7582bde4984828405aa2a8e45c27
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoForce pruning during data migration 67/87067/2
Robert Varga [Tue, 21 Jan 2020 13:31:48 +0000 (14:31 +0100)]
Force pruning during data migration

Our current PruningDataTreeModification performs pruning only in
two cases:
1) the root is being written (i.e. Snapshot recovery)
2) DataTree reports a validation issue

This is not sufficient for uint-type migration, as we have to
subject all writes and merges to pruning/translation irrespective
of where they occur.

Split up PruningDataTreeModification into two implementations,
Proactive and Reactive and use them as appropriate based on migration
requirements.

JIRA: CONTROLLER-1923
Change-Id: I4184c56380b7f52a8d7af6f17346f9c5edd31b28
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup PruningDataTreeModification 66/87066/1
Robert Varga [Tue, 21 Jan 2020 13:22:21 +0000 (14:22 +0100)]
Cleanup PruningDataTreeModification

Rename arguments to match API contract, simplify empty
YangInstanceIdentifier checks and do not attempt pruning multiple
times.

JIRA: CONTROLLER-1923
Change-Id: I4c5c8af89116b9c6f7c9dd30f63e32eca94de941
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoTranslate uint values for old streams 42/87042/10
Robert Varga [Sun, 19 Jan 2020 12:11:28 +0000 (13:11 +0100)]
Translate uint values for old streams

When we encounter a commit that was produced before Mg, we know
uints are upcasted and hence want to convert values. Same goes
for recovery snapshots.

JIRA: CONTROLLER-1923
Change-Id: Id22830abaf5adc2d9ca7f5d0233409a971cf0c01
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAllow programmatic module sharding configuration 26/85326/12
Tibor Král [Tue, 22 Oct 2019 16:24:21 +0000 (18:24 +0200)]
Allow programmatic module sharding configuration

Adds the option to create Configuration without the need for
module-shards.conf file. Current version only accepts a path
to the module-shards.conf. The file is later loaded and
deserialized into a Config object. This patch provides the
option to pass the Config object directly.

Change-Id: Ibeb666bd5f01d7ae972d26453046c959749a0656
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoExpose stream version used for DataTreeCandidate stream 38/87038/8
Robert Varga [Sun, 19 Jan 2020 10:53:05 +0000 (11:53 +0100)]
Expose stream version used for DataTreeCandidate stream

We need to properly version the payload stream, as it gives us
the view into which version produced it. This allows us to make
proper typing assumptions in normalization (and thus pruning).

JIRA: CONTROLLER-1923
Change-Id: Iaea995a5ac58e1fba2a4199d3355b321cf9fcff3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd PathArgument uint adaptation 31/87031/12
Robert Varga [Tue, 17 Dec 2019 11:56:56 +0000 (12:56 +0100)]
Add PathArgument uint adaptation

Legacy uint values may be present in NodeWithValue as well
as NodeIdentifierWithPredicates. Make sure we run the appropriate
adaptation.

JIRA: CONTROLLER-1923
Change-Id: Ib59adb9e596e4d63110cbe9987feeedc61cb05eb
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRefactor PruningDataTreeModification instantiation 41/87041/4
Robert Varga [Sun, 19 Jan 2020 11:39:58 +0000 (12:39 +0100)]
Refactor PruningDataTreeModification instantiation

Hiding the pruner works against what we want to do, as we need
to be able to control how pruning works. While we are at it, hide
delegate() so that users are forced to hold on to this invariant.

JIRA: CONTROLLER-1923
Change-Id: Iba78b2fd5f775281bf4bc04f449539d185c94f9c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRework PruningDataTreeModificationTest 37/87037/2
Robert Varga [Sun, 19 Jan 2020 10:20:08 +0000 (11:20 +0100)]
Rework PruningDataTreeModificationTest

Eliminate the use of a dedicated constructor, ensure invariants
are shared across tests.

JIRA: CONTROLLER-1923
Change-Id: Ieaec8bafcb7c2f6bf4fe22815b1b14f84d396ef9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoLeader should always apply modifications as local 76/82576/24
Tomas Cere [Tue, 18 Jun 2019 12:54:56 +0000 (14:54 +0200)]
Leader should always apply modifications as local

Normally an entry application is as follows:
1. leader sends an append entry off to persistence and replicates it to
   followers
2. leaders creates its ClientRequestTracker
3. when the entry is done with persistence and replication leader moves its
   commit index
4. part of moving the commit index is sending an ApplyState message which
   finalizes the entry application in the DataTree
5. The ApplyState determines if a ClientRequestTracker is present and adds
   an identifier to the ApplyState message if it is. This determines the way
   in which the finalize of the entry application happens in the DataTree.
   If it is present the entry is applied as if it originated on the leader,
   if it is not present it is applied as if the node is a follower.

The problem is when the leader flaps in a leader -> follower -> leader
transition after 2. and before 4..

This would mean that the new leader no longer has the ClientRequestTracker
which was created in the previous leader state, which means that when it
starts with 5. it will create the ApplyState without an identifier
and the entry finishes up the application as if the node is a follower.

This means that it will be applied without finishCommit which means that
the transaction will be forever stuck in COMMIT_PENDING state until
the node would be restarted.

Change this up, so that the leader will apply modifications as local, even
when it looses its ClientRequestTracker and add Identifiable to payloads
which require it.

Since this code path should never occur when we are candidate, catch this
transition. As ClientRequestTracker becomes an optional entity, we hide that
as well.

JIRA: CONTROLLER-1927
Change-Id: I636f998cd62ec82ef02193261624e4a51275fb86
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9 94/86994/2
Robert Varga [Thu, 16 Jan 2020 21:02:40 +0000 (22:02 +0100)]
Bump to odlparent-6.0.4/yangtools-4.0.6/mdsal-5.0.9

Pick up latest fixes and upgrades.

Change-Id: I362cc1e6bee6b9d3b6183747188cec24ad005b60
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSplit out sal-distributed-eos 79/86679/7
Robert Varga [Thu, 2 Jan 2020 12:20:37 +0000 (13:20 +0100)]
Split out sal-distributed-eos

This splits out entity ownership implementation from
sal-distributed-datastore. Key point here is that the tie with
CDS is an implementation detail, which is subject to future
revision (for example by using purely raft-based-approach).

JIRA: CONTROLLER-1922
Change-Id: Ia62b0a14991e64424b08e0d4274b0e8eaffdacbd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRefactor AbstractClientHandle a bit 45/85745/10
Robert Varga [Tue, 12 Nov 2019 11:21:13 +0000 (12:21 +0100)]
Refactor AbstractClientHandle a bit

We can pull the proxy creation method down into the subclass,
making it simpler to follow.

Change-Id: I0d025ace708a0646fb0c7dc49fc3f819453b90e5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoLower dependency to minimal network topology 21/86721/1
Robert Varga [Sun, 5 Jan 2020 16:53:15 +0000 (17:53 +0100)]
Lower dependency to minimal network topology

Controller does not need topology model extensions, it just needs
the base model. Lower feature dependencies to express that.

Change-Id: I0ccf880420eae05909fc9e2a35223a051bc49a1a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded checkstyle suppression 85/86685/1
Robert Varga [Fri, 3 Jan 2020 12:44:17 +0000 (13:44 +0100)]
Remove unneeded checkstyle suppression

We are not catching anything here, remove the suppression.

Change-Id: If15723f11bc7099d55fc1eaaa9bfa6b86461dae9
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove jsr173-ri from dependencies 79/86479/1
Robert Varga [Wed, 18 Dec 2019 11:09:46 +0000 (12:09 +0100)]
Remove jsr173-ri from dependencies

JSR173 is part of JRE, hence there is no point to inherit this
dependency. It also helps to have our releases consumable from
Central (which does not carry the .jar).

Change-Id: I3cd50c6f20149e48c1946c0ea50a3a8e57f847b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse yang-data-codec-binfmt 25/86425/6
Robert Varga [Sun, 15 Dec 2019 16:41:34 +0000 (17:41 +0100)]
Use yang-data-codec-binfmt

yang-data-codec-binfmt now carries migrated code from sal-clustering-commons,
make sure we use as much as we can, so that we do not duplicate code.

Change-Id: I5d50a63317c2d502c0eb7f71e1e6875cd95d7f9a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded Java 9+ check 56/86456/1
Robert Varga [Tue, 17 Dec 2019 02:47:56 +0000 (03:47 +0100)]
Remove unneeded Java 9+ check

We are running at least on Java 11, hence this check is useless.

Change-Id: I802c80384e652b18ef9ec0586acbface73a2cde4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove ARIES-1923 workaround 40/86440/3
Robert Varga [Mon, 16 Dec 2019 21:07:05 +0000 (22:07 +0100)]
Remove ARIES-1923 workaround

We now have proper monkey-patch in place and can therefore remove
this workaround.

Change-Id: I2f4665131953964a1ed64848843e039ccc7015c3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoFix mdsal-it-base karaf setup 55/86455/2
Robert Varga [Tue, 17 Dec 2019 02:43:17 +0000 (03:43 +0100)]
Fix mdsal-it-base karaf setup

Since we are setting up a karaf environment, we must make sure
we are not overriding opendaylight-karaf-empty, otherwise we are
not matching distribution (and not picking up its fixes,
to ARIES-1923 for example).

JIRA: ODLPARENT-209
Change-Id: I9f723ee2edd13ee4848e302c572285517a1d552b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6 62/86362/6
Robert Varga [Wed, 11 Dec 2019 23:48:08 +0000 (00:48 +0100)]
Bump odlparent/yangtools/mdsal to 6.0.3/4.0.3/5.0.6

Pick up the latest upgrades and fixes.

Change-Id: I05d54f6ad7ec934f77f123efaffc9a8a090a6384
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded javassist dependency 12/86412/1
Robert Varga [Thu, 12 Dec 2019 15:32:19 +0000 (16:32 +0100)]
Remove unneeded javassist dependency

The test is not using javassist, let's ditch the declaration.

Change-Id: I9226f2029cc4679f4fee8e126db8735e2e1ecd7d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBail faster on not found module 77/85977/4
Robert Varga [Tue, 26 Nov 2019 14:31:49 +0000 (15:31 +0100)]
Bail faster on not found module

If we fail to find config for a particular module, we can bail
directly without going through another empty check.

Change-Id: I47dc844d51ecbe1ca3f22fd355532539e07f798b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSwitch default stream output to Magnesium 95/84695/23
Robert Varga [Wed, 25 Sep 2019 06:16:56 +0000 (08:16 +0200)]
Switch default stream output to Magnesium

This flips the switch and uses Magnesium format for all unversioned
users. Also updates tests to reflect new expected stream sizes.

JIRA: CONTROLLER-1919
Change-Id: I0ed5abe495124b525b7a8c877a3cc7b09f3244ca
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoSwitch current {ABI,DataStore,Payload}Version to Magnesium 10/84710/7
Robert Varga [Wed, 25 Sep 2019 14:29:34 +0000 (16:29 +0200)]
Switch current {ABI,DataStore,Payload}Version to Magnesium

This mass-switches versioned resources to use Magnesium streaming
format. It also updates the hand-written test data to use Uint64
instead of BigInteger, as Magnesium does not support BigIntegers.

JIRA: CONTROLLER-1919
Change-Id: I4734fe3fe0064809fde899ea127e98380c8aacf4
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAllow shard settle timeout to be tuned 41/85741/9
Tibor Král [Mon, 11 Nov 2019 17:23:31 +0000 (18:23 +0100)]
Allow shard settle timeout to be tuned

When we are starting the datastore, we wait up to a fixed number of
election timeout intervals (3) for shards to finish electing a leader.

This is not always enough, especially if recovery takes a long time,
hence introduce shardLeaderElectionTimeoutMultiplier to make this
tunable.

JIRA: CONTROLLER-1914
Change-Id: Iba1d116d0248fc6046aeeae3ec30ecac50f373c9
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd javadoc links to yangtools-docs and mdsal-docs 78/85878/1
Robert Varga [Wed, 20 Nov 2019 08:14:27 +0000 (09:14 +0100)]
Add javadoc links to yangtools-docs and mdsal-docs

Cross reference controller-docs with upstreams.

Change-Id: I2143d6971b4bf4bceab331e350c7363755b03a4a
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoBump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4 49/85549/1
Robert Varga [Mon, 4 Nov 2019 13:34:56 +0000 (14:34 +0100)]
Bump to odlparent-6.0.1/yangtools-4.0.2/mdsal-5.0.4

This picks up latest upgrades and fixes.

Change-Id: I8db358b0af81394a561071d98bffea168dda47cc
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAllow AbstractClientActor generation to start from non-zero 97/85397/2
Robert Varga [Fri, 25 Oct 2019 13:50:59 +0000 (15:50 +0200)]
Allow AbstractClientActor generation to start from non-zero

This adds the ability to override the initial generation seeded
into persistence. The requested generation is controlled via
system properties on a per-client-type basis:

org.opendaylight.controller.cluster.access.client.initial.generation.datastore-operational = 500

This is useful during bringup of a zombie node, which lost all
of its persistence, for example during recovery from backup.

JIRA: CONTROLLER-1626
Change-Id: If32487fedcb5b6b39551a3359c069df940a6a725
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd the ability to report known connected clients 73/85373/8
Robert Varga [Thu, 24 Oct 2019 11:54:38 +0000 (13:54 +0200)]
Add the ability to report known connected clients

In order to allow from-scratch recovery, we need the ability to
query all existing shards to provide the identifiers of clients
they know about. This patch adds the models to support such a query
as well as implementing it in cluster-admin.

JIRA: CONTROLLER-1626
Change-Id: Id69aeb9021c8111dad10930620c9eaacfccd0d94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove dependency section from mdsal parent 84/85384/1
Robert Varga [Fri, 25 Oct 2019 07:59:36 +0000 (09:59 +0200)]
Remove dependency section from mdsal parent

This pom acts as an extension to binding parent, it is not a good
idea to also add dependencies here -- each artifact should list
them as needed.

Change-Id: I1524a234043ce334ca1a82f4e72f4fec7acdacbf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoImport scala.concurrent.Future 74/85374/2
Robert Varga [Thu, 24 Oct 2019 15:49:08 +0000 (17:49 +0200)]
Import scala.concurrent.Future

Since we are returning ListenableFuture from RPCs, we can freely
import Scala's Future and shorten references to it.

Change-Id: I77c911fa6d9eca5804547039715f3e57866bafcf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoMigrate Props.create() call sites 71/85371/3
Robert Varga [Thu, 24 Oct 2019 10:58:27 +0000 (12:58 +0200)]
Migrate Props.create() call sites

Props.create() now takes a class identifying the class being
instantiated. Fix callsites to do that.

Change-Id: I4a0169663465b0c1ba62fc87ca13423cf5a4464f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoUse singleton NodeIdentifierWithPredicates 66/85366/1
Robert Varga [Thu, 24 Oct 2019 09:38:23 +0000 (11:38 +0200)]
Use singleton NodeIdentifierWithPredicates

NodeIdentifierWithPredicates has a specialized single-entry class,
rendering SharedSingletonMap(Template) use unnecessary, which is
flag as a warning. Use the singleton constructor directly.

Change-Id: Ib16348192040d4e4f9d135e792880d8519cad4d6
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unused model imports 40/85340/1
Robert Varga [Wed, 23 Oct 2019 09:07:24 +0000 (11:07 +0200)]
Remove unused model imports

pyang is pointing out these imports as unused, fix them up.

Change-Id: Id3d59d35d764bc91e1d381de72caca2622ae4a6d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded checkstyle/spotbugs declaration 81/85281/2
Robert Varga [Mon, 21 Oct 2019 03:59:08 +0000 (05:59 +0200)]
Remove unneeded checkstyle/spotbugs declaration

odlparent is enabling these, remove superfluous configuration.

Change-Id: I80179e97046653b7e96ee79dbbd4e392ab47ae0f
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoAdd locate-shard RPC 38/85038/5
Robert Varga [Thu, 10 Oct 2019 13:36:42 +0000 (15:36 +0200)]
Add locate-shard RPC

This adds the ability to query what is the preferred node to talk
to a particular shard.

Change-Id: Idcdf9e60829d14c2f1a8cc4aceec0b3b989ef07d
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoCleanup cluster-admin.yang 33/85033/6
Robert Varga [Thu, 10 Oct 2019 11:08:00 +0000 (13:08 +0200)]
Cleanup cluster-admin.yang

We are redefining the same leaves over and over, make sure we
define them in a grouping for common definition. Also ensure
shard name requires at least one character -- just as we expect
it to happen in the implementation.

Change-Id: I917d8a7767467dceb4f3e076ffca4b5aa4b048a1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRegister action MXBean only during start 01/85201/1
Robert Varga [Fri, 18 Oct 2019 10:58:28 +0000 (12:58 +0200)]
Register action MXBean only during start

We should not be registering resources until we are started, this
fixes an exception seen in Genius UT.

Change-Id: I5a95d7e2ddbc71eca23c57843eea64f0c58dfc7c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
4 years agoRemove unneeded version declaration 47/85147/1
Robert Varga [Wed, 16 Oct 2019 12:01:45 +0000 (14:01 +0200)]
Remove unneeded version declaration

The model is properly exposed from artifacts, do not override the
managed version.

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