Jakub Morvay [Mon, 20 Mar 2017 08:58:11 +0000 (09:58 +0100)]
Bug 7407 - Add request leadership functionality to shards
This adds a new MakeLeaderLocal message to Shard class API.
MakeLeaderLocal message is sent to a local shard replica to request
the shard leader to be moved to the local node. Local shard will
contact the current leader with RequestLeadership message to initiate
leadeship transfer to itself. Original sender of MakeLeaderLocal
message will be notified about result of this operation.
Change-Id: I2b0ee7caf772457e31250d1bdddd5fc77b16fc53
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jie Han [Sat, 1 Apr 2017 01:18:02 +0000 (09:18 +0800)]
DOMDataBrokerTransactionChainImpl fix parameter name in annotation
Change-Id: I8c229c57490f6d78fc46e6c2a7db745d9adc80ad
Signed-off-by: Jie Han <jeong_hyun@msn.com>
Vratko Polak [Fri, 10 Mar 2017 15:17:15 +0000 (16:17 +0100)]
Clarify javadocs related to ProgressTracker
Change-Id: Ie208037ec2759d15c4eff86315389968e76c07bc
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Robert Varga [Thu, 30 Mar 2017 08:45:50 +0000 (10:45 +0200)]
BUG-5280: make sure we have metadata for standalone history
With metadata propagation in place, we get a ton of warnings
in the form of:
Unknown history for aborted transaction member-2-datastore-config-fe-0-txn-1261-0, ignoring
which is indicative of our failure to populate metadata builder
with the history for standalone transactions. This patch fixes
that and adds recovery for the case when we fail to find the
history in recovered journal.
Change-Id: I338666dbd910ec683a44a814deed7382eb255218
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Robert Varga [Fri, 31 Mar 2017 09:05:27 +0000 (11:05 +0200)]
BUG-5222: remove xsql from archetype
XSQL should not be here, kill it.
Change-Id: I68bafa8961598f3407763661c1c3a294c6209774
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Jakub Morvay [Fri, 3 Mar 2017 11:32:17 +0000 (12:32 +0100)]
BUG-2138: Create blueprint wiring for cds shard manager.
Change-Id: I504c294db111944c8e2047e58c3e1ef1aa81aee8
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Jakub Morvay [Thu, 23 Mar 2017 13:56:14 +0000 (14:56 +0100)]
BUG 2138 - Do not fail on module-based default shard
Currently, DistributedShardedDOMDataTree will try to create default
shards on its start. However, this can collide with module-based default
shards. If present in modules.conf, modules-based default shards will be
created on DistributedDatastore's start.
If already present, do no create default shards. Create just
DistributedShardFrontend for them.
Change-Id: I05857f520e3467116e8748e6ae231ab9dc39f44c
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Tomas Cere [Tue, 10 Jan 2017 11:44:57 +0000 (12:44 +0100)]
BUG-7965 Switch distributed-data backend to a separate shard
The shard needs to be present on all nodes and replicated across
the cluster. Making this into shard allows us to leverage the current
datastore api's and also persistence so we have the sharding layout
persisted.
The shard is started on all nodes once DistributedShardedDOMDataTree is
created.
Change-Id: I697be9b7134a27720e23e3e56f9fddc71301ec1e
Signed-off-by: Tomas Cere <tcere@cisco.com>
matus.kubica [Thu, 30 Mar 2017 11:08:36 +0000 (13:08 +0200)]
ClosedTransactionException unit test
Change-Id: Ib86fe2e8e6ece0c5cc41efdcae02223cf94d362b
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Ivan Hrasko [Tue, 28 Mar 2017 13:56:44 +0000 (15:56 +0200)]
Unit tests for ClientBackedDataStore class
Change-Id: Ieba1004283905b82730b1ee23c2afeb4eb98f963
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
matus.kubica [Tue, 21 Mar 2017 11:35:40 +0000 (12:35 +0100)]
FailedDataTreeModification JUnit test
Change-Id: Icac1405b8a17ce18119fbefb55e71898dc90082f
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Martin Ciglan [Tue, 28 Mar 2017 11:01:41 +0000 (13:01 +0200)]
BindingDOMRpcImplementationAdapter code clean-up
- warnings
- package-private access
- lambda expression
- typo
- white-spaces
- not used method parameter
Change-Id: I495e38037379f43553d723706ef87c1fb967aff6
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Robert Varga [Mon, 27 Mar 2017 14:19:25 +0000 (16:19 +0200)]
BUG-5280: make sure we arm the request timer
The timer which is supposed to timeout requests and detect
overall badness of the backeend was not being armed. Fix that
by scheduling it whenever we make the queue non-empty.
Change-Id: I9d8be694e3ed5154b66baca76c0788840a38c2f7
Signed-off-by: Robert Varga <rovarga@cisco.com>
matus.kubica [Tue, 21 Mar 2017 10:38:11 +0000 (11:38 +0100)]
JUnit test for ModuleShardBackendResolver
Change-Id: I1fd7b77873d56f02eb024e27f2bcd4e42ff7c10d
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Tom Pantelis [Wed, 8 Feb 2017 18:52:12 +0000 (13:52 -0500)]
Rework CDS commit cohort impl to handle yang lists
If a cohort registers for yang list entries, it works fine if the
transaction only contains a write or delete of one list entry.
However the DataTreeCohortActor throws an UnsupportedOperationException
from CohortBehaviour#handle if more then one list entry is written. In
that case multiple CanCommit messages are sent to the DataTreeCohortActor,
a DOMDataTreeCandidate for each entry, but the CohortBehaviour is set up
to only handle one message, after which it expects to transition to the
PostCanCommit step.
It seems the DOMDataTreeCommitCohort#canCommit API really should take
a collection of DOMDataTreeCandidates. Howeever in lieu of an API change,
I modified the CanCommit message to contain a collection of
DOMDataTreeCandidates. The DataTreeCohortActor invokes canCommit for
each one and uses the last PostCanCommitStep returned. This *may*
be OK although there doesn't seem to be an alternative at this point.
We probably should note this behavior in the DOMDataTreeCommitCohort
API.
Change-Id: I17c4d2f477ffc6c6c3921217e5f6c13bcdafde8f
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Robert Varga [Thu, 23 Mar 2017 14:46:16 +0000 (15:46 +0100)]
BUG-8056: make doCommit/finishCommit package-private
This is not a complete fix for the issue, but it eliminates
the need for synthetic accessor methods:
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.doCommit(ShardCommitCoordinator.java:296)
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.access$200(ShardCommitCoordinator.java:49)
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator$2.onSuccess(ShardCommitCoordinator.java:243)
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.finishCommit(ShardCommitCoordinator.java:316)
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.access$400(ShardCommitCoordinator.java:49)
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator$3.onSuccess(ShardCommitCoordinator.java:299)
Leading to a leaner stack.
Change-Id: I825da37f91749016a4d4e64e7bfb75f03f9b450b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 24 Mar 2017 10:54:44 +0000 (11:54 +0100)]
BUG-8073: Improve handling of temporary files
This patch reworks the logic so we end up with atomic move operations
and non-overlapping file names.
Change-Id: I4383baf664e51d8e6acfaf51f9dc5f62d77f5c14
Signed-off-by: Robert Varga <rovarga@cisco.com>
Andrej Mak [Wed, 22 Mar 2017 06:23:26 +0000 (07:23 +0100)]
Add SerializationUtils unit test
Change-Id: I7e8533c8c54c6d2cab234e9ad7db6037a97bdbdc
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Andrej Mak [Thu, 23 Mar 2017 10:01:47 +0000 (11:01 +0100)]
Add case for READY in RemoteProxyTransaction
Handling forwarded ModifyTransactionRequest with ready
protocol shouldn't cause failure, so add no op case.
Change-Id: Id8d69b49171588323ccd947b53f16576f57cb156
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Robert Varga [Thu, 23 Mar 2017 17:10:58 +0000 (18:10 +0100)]
BUG-8027: do not break actor encapsulation
Invoking abort() from ShardTransaction means we are executing code
from one actor in the context of another one and since the code path
involves persistence, this breaks Akka rather thoroughly.
Introduce a dedicated method for the required upcall and send a request
to persist separately.
Change-Id: Ic994b5e5963e8c602844e283f34df8bfa3726705
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Thu, 23 Mar 2017 13:13:44 +0000 (14:13 +0100)]
BUG-5280: fix NPE during transaction purge
Read/write transactions which transition to ready state
throw away their open transaction, which causes the following
exception:
Shard - member-1-shard-people-testTransactionChainWithMultipleShards: request Envelope{sessionId=1, txSequence=11, message=TransactionPurgeRequest{target=member-2-datastore-testTransactionChainWithMultipleShards-fe-0-chn-1-txn-2-2, sequence=2, replyTo=Actor[akka://cluster-test@127.0.0.1:2559/user/$a#-
493460599]}} caused failure
java.lang.NullPointerException
at org.opendaylight.controller.cluster.datastore.FrontendReadWriteTransaction.purge(FrontendReadWriteTransaction.java:113)
at org.opendaylight.controller.cluster.datastore.AbstractFrontendHistory.handleTransactionRequest(AbstractFrontendHistory.java:114)
at org.opendaylight.controller.cluster.datastore.LeaderFrontendState.handleTransactionRequest(LeaderFrontendState.java:197)
at org.opendaylight.controller.cluster.datastore.Shard.handleRequest(Shard.java:413)
at org.opendaylight.controller.cluster.datastore.Shard.handleNonRaftCommand(Shard.java:277)
Rework purge logic to talk directly to the data tree, which
prevents this from happening and simplifies the code a bit.
Change-Id: I7cc08687648d2473a712c171944a06307e4d8f9f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Andrej Mak [Tue, 21 Mar 2017 14:08:38 +0000 (15:08 +0100)]
Add QuarantinedMonitorActor unit test
Change-Id: I4e007dd15b1a632b8204812a49a6149615901af4
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Andrej Mak [Tue, 21 Mar 2017 13:03:22 +0000 (14:03 +0100)]
Add RoleChangeNotifier unit test
Change-Id: Ib2082c15fb18094e22a5800265150044d4896ee3
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Vratko Polak [Fri, 17 Mar 2017 14:07:03 +0000 (15:07 +0100)]
Bug 8015, Bug 7800: Do not block when publishing notifications
+ Yang model edited.
+ check-publish-notificatons implemented.
Change-Id: I757269a61bb819d2abcb07f6106b5e2ed7a34dec
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tom Pantelis [Wed, 22 Mar 2017 03:21:37 +0000 (23:21 -0400)]
Bug 7814: Add counter to make tx actor names unique
Appended an incrementing counter value to the actor name which
will guarantee uniqueness.
Change-Id: I0f36c4b96598c6035071ee2becb73ca9b18fee45
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Andrej Mak [Mon, 20 Mar 2017 08:04:45 +0000 (09:04 +0100)]
Move forwardToRemote() to LocalProxyTransaction
Method has the same body in both implementations, so
it can be moved to parrent class.
Change-Id: I25f7cb99cc3727f0cbb8da9e59343a663d776e11
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Robert Varga [Mon, 12 Dec 2016 17:59:23 +0000 (18:59 +0100)]
BUG-5280: make sure we propagate frontend metadata
This fixes an omission in initial metadata drop done as part
of I7e2c6755c3389dcb5284f17a9c6076fb9e7ac95e by registering
frontend metadata.
Change-Id: Iba85849333693484bd1870dc54d183ccc464a7ef
Signed-off-by: Robert Varga <rovarga@cisco.com>
Andrej Mak [Tue, 21 Mar 2017 07:05:34 +0000 (08:05 +0100)]
Add AbstractProxyTransaction derived classes tests
Change-Id: Ie78c9213b9ca9a41066b34463557b6feb6f8b18d
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Michael Vorburger [Wed, 15 Mar 2017 12:33:09 +0000 (13:33 +0100)]
Bug 6787: FeatureConfigPusher confusing WARN log removed
see analysis in bug: Current code already has a retry loop, and the
operation eventually succeeds; the ConcurrentModificationException
logged only created confusion and added no real value.
The code has been changed to log the last exception in the ERROR IFF
after N retries it does not succeed.
PS: We should create a generic utility helper for this ("Retryer").
Change-Id: I3c116e77f5a94366da15cc659b3a63d3a6e79f18
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
Robert Varga [Mon, 9 May 2016 09:44:52 +0000 (11:44 +0200)]
BUG-5280: expand design documentation
Add some more documentation on how actors communicate on the backend.
Change-Id: I1d4e39d1cff508ed0ef10901e8a09fd8d89580d1
Signed-off-by: Robert Varga <rovarga@cisco.com>
Andrej Mak [Thu, 16 Mar 2017 12:24:32 +0000 (13:24 +0100)]
Add AbstractTransactionCommitCohort unit tests
Change-Id: I18036259e022bfb3d027c82757a8c840cebb8ded
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Jakub Morvay [Sat, 18 Mar 2017 08:44:48 +0000 (09:44 +0100)]
Seal only modified modifications
Change-Id: I839eaebbf367a44b17595070fdea76d1f879f204
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Robert Varga [Mon, 12 Dec 2016 18:34:38 +0000 (19:34 +0100)]
BUG-5280: add frontend state lifecycle
When transitioning between roles we need to take care of proper
handling of state known about frontend. This patch adds
the leader/non-leader transitions, creating the state
from FrontendMetadata and forgetting it when transactions are
committed.
Our replicated log needs to grow more entries to accurately
replicate the state of the conversation between the frontend
and backend, so if a member becomes the leader it has
an understanding of which transactions and transaction
chains have been completed (aborted, committed, purged). These
are replicated before a response is sent to the frontend, so
if a leader before they replicate successfully, the frontend
will see them as a timeout and retry them (and be routed to the
new leader).
Both leader and followers are expected to keep the metadata
handy: the leader keeps for the purpose of being able to generate
a summarized snapshot. The followers keep it so their metadata
view is consistent with the contents of the data tree.
Change-Id: I72eea91ee84716cdd8a6a3521b42cca9a9393aff
Signed-off-by: Robert Varga <rovarga@cisco.com>
Jakub Morvay [Wed, 8 Mar 2017 17:32:43 +0000 (18:32 +0100)]
BUG-2138: Use correct actor context in shard lookup.
Typo since we cannot have all lookups being routed into
config.
Change-Id:I708787d7e5e6136b6a22d6f402071702a6de412b
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Tomas Cere [Tue, 20 Dec 2016 16:21:55 +0000 (17:21 +0100)]
BUG-2138: Fix shard registration with ProxyProducers.
Change-Id: I42f8f3cfaf9c0ef20b247abff2bec966ce5eeaa4
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Mon, 6 Mar 2017 15:11:26 +0000 (16:11 +0100)]
Bug 7801 - Implement agent RPCs for transaction writer testing
Change-Id: I75e62deb62f39869be07fcb82f3faee53f337a7d
Signed-off-by: Tomas Cere <tcere@cisco.com>
miroslav.kovac [Fri, 10 Mar 2017 11:57:15 +0000 (12:57 +0100)]
Unit test for RequestSuccess.java and derived classes
Change-Id: Ic8998c07ae714f862e18bddccda790fc8c90ee9e
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Tomas Cere [Thu, 8 Dec 2016 10:54:07 +0000 (11:54 +0100)]
BUG-2138: DistributedShardListeners support for nested shards
Adds support for listeners in shards that have a subshard/s,
which re-asseble notifications received from subshards.
Change-Id: Icc7dfb971731d78c306a87335e54668f3bbc133e
Signed-off-by: Tomas Cere <tcere@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 15 Mar 2017 10:44:04 +0000 (11:44 +0100)]
BUG-5280: Add use-tell-based-protocol config knob
The configuration knob was not documented in the corresponding configuration
file. Add it with a short explanation.
Change-Id: Ie0e866c9cf98a39568051705bbf0b10b9feaf582
Signed-off-by: Robert Varga <rovarga@cisco.com>
Andrej Mak [Wed, 15 Mar 2017 14:24:56 +0000 (15:24 +0100)]
Add AbstractClientHandle derived classes tests
Change-Id: I9eee30289814c92b7f3e7d5b2eebf49ee575b9b3
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Andrej Mak [Tue, 14 Mar 2017 08:26:15 +0000 (09:26 +0100)]
Add AbstractDataStoreClientBehavior unit tests
Change-Id: I84f83c14353480c2aee54b5fc077c5c275c26f71
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Andrej Mak [Tue, 14 Mar 2017 12:20:58 +0000 (13:20 +0100)]
Add ClientTransactionCursorTest
Change-Id: I8ea618446f8785f89221ee5c02f2f7e1f67bf40e
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Michael Vorburger [Thu, 16 Mar 2017 15:47:37 +0000 (16:47 +0100)]
Bug 6564: Fix UndeclaredThrowableException from Proxy
from LegacyEntityOwnershipServiceProviderModule
also see
http://stackoverflow.com/questions/
3715298/dynamic-proxy-and-checked-exceptions
and e.g.
https://amitstechblog.wordpress.com/2011/07/24/java-proxies-and-undeclaredthrowableexception/
Change-Id: I64d0789d1c136796610c4939337185173f90cd0a
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
matus.kubica [Mon, 13 Mar 2017 13:02:00 +0000 (14:02 +0100)]
ModifyTransactionRequestBuilder JUnit test
Change-Id: I42d04b95fc38b53e0877965240c0ef23546875fc
Signed-off-by: matus.kubica <matus.kubica@pantheon.tech>
Ivan Hrasko [Thu, 9 Mar 2017 14:45:27 +0000 (15:45 +0100)]
Unit tests: add serialization tests
- remove separate tests for proxy
- proxy classes are tested with serialization tests
Change-Id: I238d02d4c33a417c5d13d4ac1f59389d79594e4e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Tomas Cere [Mon, 27 Feb 2017 15:32:56 +0000 (16:32 +0100)]
Bug 7800 - Implement agent RPCs for Yang notification testing
Change-Id: Ia09ada21a737714a0feaa6be4a019ee1703b6d52
Signed-off-by: Tomas Cere <tcere@cisco.com>
Andrej Mak [Thu, 9 Mar 2017 12:29:02 +0000 (13:29 +0100)]
Add TransmitQueue unit tests
Change-Id: Id7067db80a3ba4f8befec1b8bccf764db2419eb7
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Andrej Mak [Thu, 9 Mar 2017 14:19:38 +0000 (15:19 +0100)]
Add VotingFuture unit test
Change-Id: Ib3abc7c59d1047d508e5d2446acc50ebf67e1b44
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Tomas Cere [Wed, 30 Nov 2016 13:13:50 +0000 (14:13 +0100)]
BUG-2138: Make DistributedShardFactory return Futures.
Since the cds shard creation runs asynchronously having Futures in the api
is more appropriate.
Change-Id: Iac5cb4827c6c125fd76074ea0411b13ac881f58d
Signed-off-by: Tomas Cere <tcere@cisco.com>
Robert Varga [Sat, 11 Mar 2017 15:53:36 +0000 (16:53 +0100)]
Fix config-netty-config's dependencies
This artifact carries only an XML file, there is no need
to pull in the mdsal infrastructure. This fixes the karaf4
feature.xml so it does not include mdsal bundles.
Change-Id: I2433cc7574e5bf237866fd509f235c55d5fe2e13
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Fri, 10 Mar 2017 16:53:20 +0000 (17:53 +0100)]
Use guava-testlib's FakeTicker
Rather than rolling our own, use the Ticker class available
in guava-testlib.
Change-Id: If3d1abec6aad20b439e19fbd48d961b7582aa607
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tom Pantelis [Fri, 10 Mar 2017 23:03:11 +0000 (18:03 -0500)]
Bug 7814: Fix InvalidActorNameException
When a read tx actor is created in the Shard, the actor name is generated
as eg "shard-member-1:datastore-operational@0:19" where 0 is the instance's
static generation id and 19 is the tx id. If the tx was created from a chain,
the chain's history id is appended. So every part of the name is constant for
the controller instance except the tx id, which is generated via a counter in
AbstractTransactionContextFactory, and the history id which is also generated
via a counter. The counters do make the full tx id unique in the cluster.
However if multiple shards are involved in a single front-end transaction,
they all have the same tx id and thus the actor names generated by each shard
would be the same. It seems that's what occurred in Bug 7814. Therefore I
changed the actor name to include the shard name.
Change-Id: Iacb11bb401bd6bded38847690f8009c115ee0637
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
root [Mon, 6 Mar 2017 14:32:44 +0000 (15:32 +0100)]
Fix FindBugs warning around static invocation
For some reason FB does not like our copy-pasted code,
so centralize the formatting primitive into a dedicated
method.
Change-Id: Ia73c5d5b163181b476f0a8ac3eb4744e9d9538d3
Signed-off-by: root <rovarga@cisco.com>
Martin Ciglan [Fri, 10 Mar 2017 13:38:13 +0000 (14:38 +0100)]
Bug 6859: Binding generator v1 refactoring
based on https://git.opendaylight.org/gerrit/#/c/53140/,
make sure Controller compiles
Change-Id: I0d16ef9a278983f94166ea427174a479dac86581
Signed-off-by: Martin Ciglan <mciglan@cisco.com>
Ivan Hrasko [Thu, 9 Mar 2017 13:31:03 +0000 (14:31 +0100)]
Unit tests for RequestFailure derived classes
Change-Id: I3b9fb7f6707b4519ea91880a369cfba0af24eb4e
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
miroslav.kovac [Wed, 8 Mar 2017 12:03:38 +0000 (13:03 +0100)]
Unit test for AveragingProgressTracker class
Change-Id: Ice50c174cfe365e171aef1b3c4485cf49356c534
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Robert Varga [Mon, 6 Mar 2017 15:05:09 +0000 (16:05 +0100)]
Cache MapJoiner
There is no need to instantiate the Joiner everytime we format
a map, as the instance is immmutable and thread-safe. Cache
a single object, allowing for slightly faster access.
Change-Id: Idff936f6525059d0e9abd6eae1370fd3066996a4
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 6 Mar 2017 14:13:22 +0000 (15:13 +0100)]
BUG-5280: Invoke both close and purge at the same time
There is no need to gate purge step on the close step
with the current frontend code. Enqueue both steps at the same
time, improving efficiency.
Change-Id: Ia47fa598f7d3798889d03d1f70896c75eff313ea
Signed-off-by: Robert Varga <rovarga@cisco.com>
Vratko Polak [Thu, 9 Mar 2017 10:57:26 +0000 (11:57 +0100)]
Bug 7799: Set inactive on any flapping service error
Also updated the Yang model to a corresponding description.
Change-Id: Ia1d4a815ad3e03b35f4daa9a57ddb8ba610d4003
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Andrej Mak [Thu, 2 Mar 2017 11:38:21 +0000 (12:38 +0100)]
Add FrontendTypeTest
Change-Id: Ie3129ef8b5147e8f9dfb4be51a6bfa906c5aff65
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Andrej Mak [Wed, 8 Mar 2017 14:36:52 +0000 (15:36 +0100)]
Add cds-access-client unit tests
Change-Id: I9950569d45f26741022ba5a34a744b81474e662e
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Tom Pantelis [Mon, 6 Mar 2017 13:44:41 +0000 (08:44 -0500)]
Bug 7901: Prevent null Modification in BatchedModifications
Caused by: java.lang.NullPointerException
at org.opendaylight.controller.cluster.datastore.modification.
MutableCompositeModification.writeExternal(MutableCompositeModification.java:120)
Somehow a null Modification instance got added to the modifications List.
Looking at the callers of addModification, it is not clear which call site
might have been the culprit. So I added a guard in addModification against
a null input Modification and logged an error with stack trace. I also
modified getModifications to return an immutable List to prevent callers
from directly modifying the List (there was one).
Change-Id: Ic63aa9daada0548da05fe663a0d22cdcb3e7bceb
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Thu, 9 Mar 2017 05:00:12 +0000 (00:00 -0500)]
Fix timing issue in testChangeToVotingWithNoLeader
RaftActorServerConfigurationSupportTest#testChangeToVotingWithNoLeader
failed on jenkins:
RaftActorServerConfigurationSupportTest.testChangeToVotingWithNoLeader:1213 getStatus expected:<OK> but was:<NO_LEADER>
In the following test code:
MessageCollectorActor.clearMessages(node1Collector);
long term = ...
node1RaftActorRef.tell(new AppendEntries(...). ActorRef.noSender());
// Wait for the ElectionTimeout to clear the leaderId...
MessageCollectorActor.expectFirstMatching(node1Collector, ElectionTimeout.class)
It expects an ElectionTimeout message to occur after the AppendEntries tell
but it's possible for an ElectionTimeout message to occur in between
clearMessages and tell calls which leads to the subsequent NO_LEADER b/c the
leaderId wasn't cleared yet via a subsequent ElectionTimeout message.
The test expects the leaderId to be cleared after the AppendEntries tell so
I changed it to explicitly check for that. The fact that it's actually cleared
as a side effect of an ElectionTimeout message is an implementation detail
anyway.
Change-Id: I66eaad090d0e75fc3731e59f0a345cb04b4f2c4c
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Andrej Mak [Mon, 6 Mar 2017 14:53:55 +0000 (15:53 +0100)]
Add cds-access-client unit tests
Change-Id: I0f330dfd02d1562d0965a9d3a27721970d5fece8
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
miroslav.kovac [Wed, 8 Mar 2017 09:06:24 +0000 (10:06 +0100)]
Unit test for NoProgressException class
Change-Id: I382413bbf2e088f4a55a7f1a1c0af18e4603705f
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Ivan Hrasko [Tue, 7 Mar 2017 09:42:22 +0000 (10:42 +0100)]
Unit tests for TransactionSuccess derived classes
Change-Id: I4f5a27d86875f53d1dee28350c16af79fd97eef0
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Ivan Hrasko [Mon, 6 Mar 2017 15:09:20 +0000 (16:09 +0100)]
Unit tests for Request derived classes
Change-Id: I56d98cb89bf0cc474e69a797553aace1d8c2c040
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Ivan Hrasko [Fri, 3 Mar 2017 14:34:56 +0000 (15:34 +0100)]
Unit tests for AbstractRequestProxy derived classes
Change-Id: Id7eb9c30a147496dcb765843d4eb3463402c0df5
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Tomas Cere [Mon, 28 Nov 2016 13:30:00 +0000 (14:30 +0100)]
BUG-2138: Listener support in shard frontend
Change-Id: Icc997649ab56dc66a95d53f11c514fa3f2cc457f
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Wed, 7 Sep 2016 11:48:27 +0000 (13:48 +0200)]
BUG-2138: Create DistributedShardFrontend
Use the abstract shard implementations from md-sal to create
a frontend implementation of a cds shard that forwards requests
to backend shards via DistributedDatastoreClient.
Change-Id: I7a3485f414368728e71ab2746c84d7a0f83f1436
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Thu, 23 Feb 2017 15:15:23 +0000 (16:15 +0100)]
BUG 7799: Implement agent RPCs for singleton rapid un-registration testing
Change-Id: I080a8af30c2a47e2046b0235ea75055e4c4a51cf
Signed-off-by: Tomas Cere <tcere@cisco.com>
miroslav.kovac [Thu, 2 Mar 2017 11:56:19 +0000 (12:56 +0100)]
Unit tests for controller RequestException
Change-Id: Ic8c0768a28fb9aa3656358668656a8d3b34639b1
Signed-off-by: miroslav.kovac <miroslav.kovac@pantheon.tech>
Andrej Mak [Thu, 2 Mar 2017 07:49:45 +0000 (08:49 +0100)]
Add unit tests for Envelope classes
Change-Id: I9d4c1034ae4bbb6531b27fa60e83d545a0d88eb9
Signed-off-by: Andrej Mak <andrej.mak@pantheon.tech>
Jakub Toth [Wed, 22 Feb 2017 12:53:39 +0000 (13:53 +0100)]
Bug 6859 - Binding generator v1 refactoring
Based on transfer of Binding generator v1 from
Yangtools project to MDSAL in past, we need to finalize
this process by refactoring package naming:
org.opendaylight.yangtools -> org.mdsal.binding
org.opendaylight.yangtools.sal -> org.mdsal.binding
Refactoring changes in MDSAL, see:
https://git.opendaylight.org/gerrit/#/c/52107
By using of Binding generator v1, this change needs to be addressed in
Controller project.
- refactoring itself
- add META-INF to gitignore
Change-Id: Ib7ec1b39466c0c814459bcbc2adce437b2a0ca64
Signed-off-by: Jakub Toth <jatoth@cisco.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
Vratko Polak [Mon, 6 Mar 2017 14:01:10 +0000 (15:01 +0100)]
Bug 7795: Do not prescribe notification throttling mechanism
https://git.opendaylight.org/gerrit/#/c/52320
uses NotificationPublishService#putNotification
which returns void, not Future.
Change-Id: I88c3898b014820168d5748174c9112daa42acbde
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Ivan Hrasko [Wed, 1 Mar 2017 12:59:55 +0000 (13:59 +0100)]
Unit tests for AbstractLocalTransactionRequest derived classes
Change-Id: I34978326821bf6b8cc7604ee284f2fda20585618
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Igor Foltin [Fri, 3 Mar 2017 10:59:12 +0000 (11:59 +0100)]
Bug 6856: Rpc definition should implicitly define input/output
The yangtools patch for this bug required a minor change in mdsal's
binding generator v1 to maintain compatibility. The mdsal patch has
already been merged. The binding generator v1 now generates classes
for input and output statement only if they are explicitly declared
in the model. As a consequence, a minor adjustement has to be made
in BindingToNormalizedNodeCodec's findRpcMethod().
This patch needs to be merged to unblock the distribution-check job
in the yangtools patch.
Change-Id: I6ed0e57aae35987ae943c8aa7a4a79861af04f7a
Signed-off-by: Igor Foltin <ifoltin@cisco.com>
Ryan Goulding [Thu, 2 Mar 2017 21:49:04 +0000 (16:49 -0500)]
Fix spacing in project pom.xml for archetype
Change-Id: I76eaa43699fcb1e192c54586cc84cfff1297b281
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Ryan Goulding [Thu, 2 Mar 2017 22:38:29 +0000 (17:38 -0500)]
Fix archetype spacing so it falls within acceptable horizontal width guidelines
Several poms had extremely long lines. This fixes the long lines.
Change-Id: I0f93436ac2dd3c27c0bbea31f82c649c8874f880
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Ryan Goulding [Thu, 2 Mar 2017 21:53:49 +0000 (16:53 -0500)]
Modify archetype to enable checkstyle failOnError by default
As a community, we want to try our best to influence new projects to write
clean, consistent code. As such, we really ought to enable checkstyle failOnError
for projects that are generated using the startup archetype. This change does
that; projects can still turn this off, but it requires manual opt out.
By default, we should really try to influence failOnError so people write
good looking code.
Change-Id: If740df92cbc3d8ff8a0169d323028415e239a15a
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Ryan Goulding [Thu, 2 Mar 2017 21:42:42 +0000 (16:42 -0500)]
Enable fail on checkstyle violation for archetype code
Change-Id: I949a8704d7c09a59f21011c2e91778c9f37b31f4
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Tomas Cere [Wed, 22 Feb 2017 18:06:37 +0000 (19:06 +0100)]
BUG 7798 - Implement agent RPCs for singleton RPC registration testing
This implements get-singleton-constant and it's lifecycle control rpc's
used for testing.
Change-Id: If4412070aee143fdf3b05479c484c44b90a486d4
Signed-off-by: Tomas Cere <tcere@cisco.com>
Tomas Cere [Mon, 20 Feb 2017 13:22:19 +0000 (14:22 +0100)]
BUG 7797 - Implement agent RPCs for routed RPC testing
This implements routed get-constant and it's lifecycle
controlling rpc's.
Change-Id: I8ce04c5e62758a80ab5fc01921ad59c4373aeb3f
Signed-off-by: Tomas Cere <tcere@cisco.com>
Jakub Morvay [Wed, 1 Mar 2017 12:29:50 +0000 (13:29 +0100)]
BUG-5280: handle TransactionPurgeRequest replay
Handle TransactionPurgeRequest in RemoteProxyTransaction
Change-Id: Icf467361b949e02ba5c02d8e8630dbff7519d330
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
Thanh Ha [Wed, 1 Mar 2017 17:49:35 +0000 (12:49 -0500)]
Add artifact name formatting used by autorelease
As recommended by the autorelease project we're now requesting projects
use a specific format for their <name> definitions in their pom files.
Please refer to the Trello link for further details.
Trello: https://trello.com/c/EGYoCYXX
Change-Id: I5a074b3f21e72283a8ad6dcd82f9dc6fbcf67fa6
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Thanh Ha [Wed, 1 Mar 2017 17:33:02 +0000 (12:33 -0500)]
Add .gitreview to startup archetype
All projects should have a .gitreview so let's initialize them with one.
Change-Id: I081af4f977cd91760e4ae38de97a765413a1399b
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Robert Varga [Tue, 28 Feb 2017 21:29:15 +0000 (22:29 +0100)]
Turn opendaylight/md-sal/pom.xml into an aggregator
This pom is not referenced in code artifacts anymore, we can stop
pulling in unnecessary stuff.
Change-Id: I4f5db9ba2c1ef7874bb5c593714fb4977541638d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Mar 2017 00:40:42 +0000 (01:40 +0100)]
Cleanup samples/toaster-provider/pom.xml
Do not depend on aggreator pom.
Change-Id: I9a9e368e48dbeadb6739a965cfe991f5173a635d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Mar 2017 00:37:30 +0000 (01:37 +0100)]
Cleanup samples/toaster-consumer/pom.xml
Do not depend on aggreator pom.
Change-Id: I6d4fed36ed5c32eb6a1523c81003f34e373ca52d
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Wed, 1 Mar 2017 00:33:58 +0000 (01:33 +0100)]
Cleanup samples/clustering-test-app/provider/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: Ia6909ae141c5b0f327ccb8c12d92ec35e11a5913
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 16:31:52 +0000 (17:31 +0100)]
Cleanup sal-dom-broker/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: I8afef926aa791c55b30f418b78eaf045db521778
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 21:26:43 +0000 (22:26 +0100)]
Cleanup sal-binding-dom-it/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: I54340799a12db0f65e0c99284e16040c6b50fab9
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 21:21:12 +0000 (22:21 +0100)]
Cleanup benchmark-data-store/pom.xml
Restructuring to not inherit from aggregator pom. Also bump JMH
while we're here.
Change-Id: I1e9321ddc4812d2057872c52d14408ed3ca7b57b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 21:17:27 +0000 (22:17 +0100)]
Cleanup messagebus-config/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: Iced30e9e93219d2d8f8b9b120acd5c19defb7bab
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 21:14:55 +0000 (22:14 +0100)]
Cleanup messagebus-util/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: I04d535223796e5a720061c1c9064a6bd0cf32e13
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 21:10:46 +0000 (22:10 +0100)]
Cleanup messagebus-api/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: I993304d208e9075356a870cf64903d967309fbae
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 17:11:57 +0000 (18:11 +0100)]
Cleanup sal-dom-broker-config/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: I6b42355cf066e0bfcc254cd699ac229e1fd08a3e
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 20:55:20 +0000 (21:55 +0100)]
Cleanup sal-dom-xsql-config/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: Ifa7d6e269ac6e0cad63733b0e843d603e8846ab2
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 21:04:33 +0000 (22:04 +0100)]
Cleanup sal-test-model/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: I5558773fa0d50249d04f2dc3db3f20574749de1f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Tue, 28 Feb 2017 20:52:45 +0000 (21:52 +0100)]
Cleanup sal-karaf4-xsql/pom.xml
Restructuring to not inherit from aggregator pom.
Change-Id: Ic199d697e21eb128c76899ead573d2cf99ebc5e1
Signed-off-by: Robert Varga <rovarga@cisco.com>