Maros Marsalek [Wed, 25 Mar 2015 10:10:19 +0000 (11:10 +0100)]
BUG-2424 Bump mina sshd-core version to 0.14
The 0.14 version includes fix for following issue:
https://issues.apache.org/jira/browse/SSHD-393
It caused the transfer over ssh to freeze completely when sending big messages
e.g. 8Mb
Tested using connection between ODL and netconf-testtool transfering yang schema
with size of 40Mb.
Change-Id: I8a2dc38f0feed30a0f6b6c4197e9a546df16491b
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tom Pantelis [Sat, 7 Mar 2015 04:40:15 +0000 (23:40 -0500)]
Optimize TransactionProxy for write-only transactions
For write-only transactions, modified TransactionProxy to prepare
the Tx modifications directly on the Shard rather than having the
Shard create a separate ShardTransaction actor. The BatchedModifications
messages are sent directly to the shard. On ready, the last
BatchedModifications is flagged as ready, thus also eliminating the
ReadyTransaction message. In this manner, we eliminate the
CreateTransaction and the ReadyTransaction messages and the
the ShardTransaction actor.
Several new fields were added to the BatchedModifications message:
transactionID, transactionChainID, and ready. On the last, readied
BatchedModifications message, the Shard returns the
BatchedModificationsReply message with the cohort actor (the Shard
itself).
The BatchedModifications messages are handled by the
ShardCommitCoordinator. I started creating a separate
ShardTransactionCoordinator but realized I'd have to duplicate some
storage plus the 2 coordinators should have to interface. The
CohortEntry is used to store the prepared DOMStoreWriteTransaction.
Perhaps ShardCommitCoordinator should be renamed to
ShardTransactionCoordinator but that can be refactored later.
I create a DOMTransactionFactory that is used by both the
ShardCommitCoordinator and the Shard to create DOM transactions and
update the mbean stats.
Change-Id: I0d8126149f80854feb504ed9d8e49bcc7db253ce
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Tue, 24 Mar 2015 17:03:46 +0000 (17:03 +0000)]
Merge "Add more info to ShardStats JXM bean"
Tom Pantelis [Tue, 24 Mar 2015 12:43:46 +0000 (12:43 +0000)]
Merge "BUG 2849 : Reduce sending of duplicate replication messages"
Tom Pantelis [Tue, 24 Mar 2015 12:39:29 +0000 (12:39 +0000)]
Merge "BUG 2854 : Do not add empty read write transactions to the replicable journal"
Tom Pantelis [Fri, 13 Mar 2015 11:42:02 +0000 (07:42 -0400)]
Add more info to ShardStats JXM bean
Added more raft state information to the ShardStats, including lastIndex,
lastTerm, snapShotIndex, snapshotTerm, replicatedToAllIndex, info about
each follower (if the leader), and peer addresses. Basically all the
pertinent raft actor state is now reported.
Instead of having the Shard update the stats bean as things change,
which would be difficult with some of the state, I changed ShardStats to
send a GetOnDemandRaftState message to the shard actor which returns all
the state info in an OnDemandRaftState reply. This captures the state in
a thread-safe manner. Since each piece of information is returned by the
ShardStats bean in separate methods, I didn't want each call to send the
message so I cache the last OnDemandRaftState reply for 2 seconds.
With this change, the Shard no longer needs to keep the ShardStats up to date
with the current state.
Change-Id: I1775ba35747c68028f5c3e31789b958d35afa172
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Mon, 23 Mar 2015 17:41:15 +0000 (17:41 +0000)]
Merge "Refactor LeaderElectionScenarioTests"
Moiz Raja [Mon, 23 Mar 2015 17:37:32 +0000 (17:37 +0000)]
Merge changes Idfb4fbea,Ief82b050
* changes:
Add RaftActor integration tests
Refactor InMemoryJournal and InMemorySnapshot to sal-akka-raft
Tony Tkacik [Mon, 23 Mar 2015 11:05:09 +0000 (11:05 +0000)]
Merge "BUG-2878: Add the XML declaration to every outgoing NETCONF message."
Tony Tkacik [Mon, 23 Mar 2015 10:06:39 +0000 (10:06 +0000)]
Merge "BUG-2801: Added filtering for get and getConfig in netconf mdsal northbound."
Tony Tkacik [Mon, 23 Mar 2015 10:05:22 +0000 (10:05 +0000)]
Merge "BUG-2837 Check netconf base 1.1 capability correctly"
Robert Varga [Sun, 22 Mar 2015 13:50:23 +0000 (14:50 +0100)]
XSQL: cache ClasLoader reference
Instead of looking up the class loader on each invocation, cache it
once. Same goes for the list of interfaces being instantiated.
Change-Id: I3954f65e167c57d090579eeef8924e5cc6fedfed
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sun, 22 Mar 2015 13:44:00 +0000 (14:44 +0100)]
XSQL: prevent autoboxing
Instead of using object instances, which need to be boxed/unboxed, use a
simple field.
Change-Id: I936bea7b62e08053d0c83fbb20cc2ef798b95de6
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Sun, 22 Mar 2015 13:47:42 +0000 (14:47 +0100)]
XSQL: eliminate use of System.err.println
Use a normal logger instead.
Change-Id: Ib06dfaf1a0d4c836e1c19353a57cc070fddbf95a
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tomas Cere [Mon, 9 Mar 2015 15:26:39 +0000 (16:26 +0100)]
BUG-2801: Added filtering for get and getConfig in netconf mdsal northbound.
Change-Id: I37db2b21712c7b3d16c6b9dafa193a3fb9df4430
Signed-off-by: Tomas Cere <tcere@cisco.com>
Maros Marsalek [Fri, 20 Mar 2015 14:19:06 +0000 (15:19 +0100)]
BUG-2837 Check netconf base 1.1 capability correctly
Check the entire URI for netconf base 1.1 presence in hello message
Change-Id: Ida5f9bf3445b24c2945c2ac583f53806f4c1e01f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Gwenael Lambrouin [Fri, 20 Mar 2015 14:02:31 +0000 (15:02 +0100)]
BUG-2878: Add the XML declaration to every outgoing NETCONF message.
Cisco routers expect that NETCONF messages are prefixed by the XML declaration
<?xml version="1.0" encoding="UTF-8"?>. Else, they close the NETCONF/SSH
connection and log an error such as "NETCONF-ERROR: parse error before hello seen".
This patch adds the XML declaration to every outgoing NETCONF message so that
Cisco routers accept NETCONF messages coming from the OpenDaylight controller.
This is a workaround for the sake of interoperability: according to RFC 6241,
the XML declaration is optional so Cisco routers should accept NETCONF messages
without XML declaration. See RFC 6241 section 3 "XML Considerations":
A NETCONF message MAY begin with an XML declaration (see Section 2.8
of [W3C.REC-xml-
20001006]).
Change-Id: I04a8b61a8fcef6738e8a4552f0560aa319add014
Signed-off-by: Gwenael Lambrouin <gwenael.lambrouin@b-com.com>
Robert Varga [Fri, 20 Mar 2015 12:10:17 +0000 (13:10 +0100)]
Fix settle wait strategy
CountDownLatch time expiration is not reported via exception, so the
reporting code was wrong.
Change-Id: Ic8b0ea7fd50cbcb3d03710ae3949f2447534fe1f
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 22:06:47 +0000 (22:06 +0000)]
Merge "BUG-2383: make DOMDataBrokers implement DOMDataTreeChangeService"
Robert Varga [Thu, 19 Mar 2015 13:16:48 +0000 (14:16 +0100)]
BUG-2383: make DOMDataBrokers implement DOMDataTreeChangeService
With the datastore support in place, we can now expose the optional
functionality. In order to do so compatibly, we introduce an
experimental API to get access to optional backend features.
Change-Id: I22bf68bd95d98d3c53ee7401442e4812d3615334
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 21:16:38 +0000 (21:16 +0000)]
Merge "Fix modules Restconf call for mounted devices"
Tony Tkacik [Thu, 19 Mar 2015 21:13:09 +0000 (21:13 +0000)]
Merge "Optimize ResolveDataChangeEventsTask object allocation"
Tony Tkacik [Thu, 19 Mar 2015 21:04:28 +0000 (21:04 +0000)]
Merge "Increase IDLE timeout for ssh netconf server"
Tony Tkacik [Thu, 19 Mar 2015 21:04:06 +0000 (21:04 +0000)]
Merge "BUG-2739 Fix concurrent metadata cleanup for netconf-connector"
Jan Hajnar [Mon, 16 Mar 2015 11:00:21 +0000 (12:00 +0100)]
BUG 2412 - Remove CompositeNode from sal-dom-*
* removed CompositeNodes from sal-dom-broker
* removed deprecated services from sal-dom-broker
* removed deprecated services from sal-dom-api
* removed deprecated api calls from sal-binding-broker tests and
sal-dom-spi
Change-Id: Iae44e5c0acd0ad602bf98b9961fcd808657ac07b
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Maros Marsalek [Thu, 19 Mar 2015 17:16:49 +0000 (18:16 +0100)]
BUG-2739 Fix concurrent metadata cleanup for netconf-connector
When deleting/closing a netconf-connector, the cleanup came from 2-3 places and
was not properly synchronized resulting in failed transaction with metadata
still present
Change-Id: I91f1c8bf3d5d24cc2cf4fdb02fb1f5cc3f8a8796
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Jan Hajnar [Wed, 18 Mar 2015 14:23:37 +0000 (15:23 +0100)]
BUG 2412 - remove CompositeNode from sal-binding-dom-it
* removed all CompositeNodes from tests which used it. Tests have to be
rewriten with NormalizedNodes ASAP.
Change-Id: Ib666f9fb9de9fc35e1be554cb630ea5f01f6617e
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Jan Hajnar [Wed, 18 Mar 2015 14:25:15 +0000 (15:25 +0100)]
BUG 2412 - remove CompositeNode from sal-clustering-common
* cleaning all help methods from Util classes which are working
with deprecated CompositeNode class
Change-Id: I31397a1379ef541d642acec68542860ac689481e
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Jan Hajnar [Wed, 18 Mar 2015 16:37:56 +0000 (17:37 +0100)]
BUG 2412 - remove CompositeNode from sal-remoterpc-connector
* akka remote RPC distribution needs move to new DOM API
* remove all tests which are use CompositeNode. Test has to be
rewriten with NormalizedNodes ASAP.
Change-Id: I8863f5c9657992d23be67acb2f542b0fda81db8c
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Jan Hajnar [Wed, 18 Mar 2015 16:27:51 +0000 (17:27 +0100)]
BUG 2412 remove CompositeNode from RestconfImpl codeBase
* remove all references for CompositeNode from Restconf codeBase
* remove all depricated classes from Restconf
* remove all tests which have worked with CompositeNode
* we would like to fix tests and move to correct place (in yangtools
and controller integration test for JerseyTest suite)
Note: The removed tests are still in git history. A fixes for Test
suite will be realized ASAP (expectation: in next couple of weeks).
Change-Id: I66b423c92e5ff5b34882b92aece54c5f641c070c
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 14:25:34 +0000 (15:25 +0100)]
Bug 868: Removed use of CompositeNode Binding Codecs.
Change-Id: Iaaf22bd8bc788f26814e06873b483bf0424ceaf2
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 15:54:25 +0000 (15:54 +0000)]
Merge "BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs to Lithium API (copyrights corrected)"
Ed Warnicke [Thu, 19 Mar 2015 15:31:32 +0000 (15:31 +0000)]
Merge "Renamed Binding DOM Adapters to share same naming convention."
Ed Warnicke [Thu, 19 Mar 2015 15:02:00 +0000 (15:02 +0000)]
Merge "Bug 868: Binding MD-SAL exports new codec factory."
Maros Marsalek [Thu, 19 Mar 2015 14:58:39 +0000 (15:58 +0100)]
Fix modules Restconf call for mounted devices
Restconf was relying on the remote devices to contain restconf yang model. Now
Restconf relies on the controller's schema context when it serializes the
modules response.
Change-Id: Ib406d0082a5aafb7e894440ee5f75e5032ea35ba
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 14:34:55 +0000 (14:34 +0000)]
Merge "BUG-2673: deprecate ListenerNode,Tree and Walker"
Maros Marsalek [Thu, 19 Mar 2015 14:21:17 +0000 (15:21 +0100)]
Increase IDLE timeout for ssh netconf server
We might consider doing unlimitted idle, mina ssh library needs to be checked.
Change-Id: Ia36f61fd89d1d9690e5f6a438247fde0be209404
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 12:26:19 +0000 (12:26 +0000)]
Merge "Remove RuntimeGeneratedMappingService from config-manager"
Robert Varga [Thu, 19 Mar 2015 11:58:48 +0000 (12:58 +0100)]
Optimize ResolveDataChangeEventsTask object allocation
ResolveDataChangeEventsTask queried before/afterData methods multiple
times. The default implementation in yangtools instantiates an object on
each call, which leads to sub-optimal performance. Cache the returned
object and use it locally, which actually makes the code more readable.
As a further change, perform the same caching with modification type, as
that may end up being computed on access.
Change-Id: I43aa4824c1a5788060035cd419400d86b0116de7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Wed, 18 Mar 2015 14:26:04 +0000 (15:26 +0100)]
Renamed Binding DOM Adapters to share same naming convention.
Renamed Forwarded* classes to BindingDOM*Adapter which
better describes what implementations are doing.
These are implementation classes and are not part of public
API contract outside of sal-binding-broker-impl, so this
should not affect any users.
Change-Id: I1c3b5f275daa38c82215ca3ba8b8170990e9ac43
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Wed, 18 Mar 2015 14:21:09 +0000 (15:21 +0100)]
Bug 868: Binding MD-SAL exports new codec factory.
Migrated MD-SAL to export BindingCodecTreeFactory,
which provides access to new codecs, which allows
us to migrate users without need to change initial
configuration.
Change-Id: Icb741dd73e3b22f64f5f538236d36a99e9c05b4e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Robert Varga [Mon, 16 Mar 2015 18:42:26 +0000 (19:42 +0100)]
BUG-2673: deprecate ListenerNode,Tree and Walker
All of these have been superseded by RegistrationTree and related
classes. Those should offer better performance due to not instantiating
intermediate Optional nodes when searching for nodes.
Change-Id: I1e16bcb045ca5c97ca7f245e44d94d133bbf4eac
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Thu, 19 Mar 2015 08:16:32 +0000 (08:16 +0000)]
Merge "fixed restconf notification subscription parsing."
Tony Tkacik [Thu, 19 Mar 2015 08:16:13 +0000 (08:16 +0000)]
Merge "Reenable netconf-notifications-impl xml tests"
Igor Bartak [Wed, 18 Mar 2015 17:00:13 +0000 (18:00 +0100)]
BUG 2799: Migration of Message Bus from deprecated Helium MD-SAL APIs
to Lithium API (copyrights corrected)
Change-Id: I2206b4b532e4feead26c166b793966b077f0f26f
Signed-off-by: Igor Bartak <ibartak@cisco.com>
Maros Marsalek [Wed, 18 Mar 2015 11:01:28 +0000 (12:01 +0100)]
Remove RuntimeGeneratedMappingService from config-manager
Replace with BindingRuntimeContext
Change-Id: I8e3ef881898f6ea7b9c3922a3bfaf3094667c644
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Ed Warnicke [Wed, 18 Mar 2015 16:08:55 +0000 (16:08 +0000)]
Merge "Bug 2841: Fixed missing output element in Restconf RPCs"
Tony Tkacik [Tue, 17 Mar 2015 11:12:09 +0000 (12:12 +0100)]
Bug 2841: Fixed missing output element in Restconf RPCs
JAXRS Body Writers reused root data container writeout
for RPC outputs, which differed and writed "data"
container instead of rpc "output", refactored writeTo
method, to do this special handling.
Change-Id: Ia6acf671b760c9aa578a02ce803c99a389030260
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Tony Tkacik [Wed, 18 Mar 2015 08:45:43 +0000 (08:45 +0000)]
Merge "Add config classifier to netconf-mdsal-config jar"
Moiz Raja [Tue, 17 Mar 2015 01:17:12 +0000 (18:17 -0700)]
BUG 2854 : Do not add empty read write transactions to the replicable journal
Change-Id: I7af5689975de64331fd9739d4ae682fdff1940ee
Signed-off-by: Moiz Raja <moraja@cisco.com>
Moiz Raja [Wed, 11 Mar 2015 20:22:31 +0000 (13:22 -0700)]
BUG 2849 : Reduce sending of duplicate replication messages
With Raft not all append entries are expected to reach the followers
so it is a requirement that when acknowledgement of an append entries
is not received we send a duplicate append entries.
In replication scenarios where a lot of rapid replication messages
are being generated the lack of equally rapid acknowledgement results
in a lot of duplicate messages being generated. This later results in
a cycle when the replies for those duplicate replication messages start
arriving and result in even more duplicate replication messages being
sent.
This patch addresses this problem by disallowing a replication message
to be generated for a follower is the nextIndex for that follower
has not changed or the time since the last replication message exceeds
the heartbeat interval. This allows us to reduce duplicates but still
allows duplicates to get generated for legitimate reasons.
Change-Id: I0918672468f4fc1da935c45c7b46c750cde619f4
Signed-off-by: Moiz Raja <moraja@cisco.com>
Tony Tkacik [Tue, 17 Mar 2015 17:49:55 +0000 (17:49 +0000)]
Merge "BUG-2836 Workaround"
Tony Tkacik [Tue, 17 Mar 2015 14:58:37 +0000 (15:58 +0100)]
Bug 868: Introduced DOM ForwardingSession utility classes.
Introduced DOM ForwardingSession abstract classes,
in order to migrate AAA from CompositeNode interfaces,
since they were using it only to forward calls to backing
implementation.
Change-Id: If5ed1a5dadc02c0d7433fd9652a4af9b586a9be7
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
Maros Marsalek [Tue, 17 Mar 2015 13:33:09 +0000 (14:33 +0100)]
BUG-2836 Workaround
Change-Id: Ibcec955562ed72946100512d8f1db294c2cb4ccd
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Tue, 17 Mar 2015 11:30:27 +0000 (11:30 +0000)]
Merge "BUG-2673: make IMDS implement DOMStoreTreeChangePublisher"
Tony Tkacik [Tue, 17 Mar 2015 11:28:27 +0000 (11:28 +0000)]
Merge "BUG-2673: Introduce AbstractDOMStoreTreeChangePublisher"
Tony Tkacik [Tue, 17 Mar 2015 11:27:43 +0000 (11:27 +0000)]
Merge "BUG-2673: Create AbstractRegistrationTree and related classes"
Maros Marsalek [Tue, 17 Mar 2015 10:14:28 +0000 (11:14 +0100)]
Add config classifier to netconf-mdsal-config jar
The jar was included in the features without the config classifier, which caused
the distributions to fail to install md-sal netconf config file (in case the
local m2 repo did not contain pre-built artifacts from controller project)
Change-Id: I1cc3d8f02e55ae9fd30abac706645b879753b2da
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Mon, 16 Mar 2015 17:54:39 +0000 (18:54 +0100)]
BUG-2673: make IMDS implement DOMStoreTreeChangePublisher
This patch makes use of the AbstractDOMStoreTreeChangePublisher to do all
the registration wrangling and forwards all notifications towards a
dedicated publisher. Notifications are offloaded to the background
executor, just as normal DataChangeNotifications are. This initial
implementation does not close the registration listener race also
present in the data change notifications, as the notification manager
lacks the APIs to do that.
Change-Id: I36220b52a7a67df1f340b2b8bf32918de025920b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 16 Mar 2015 12:21:24 +0000 (13:21 +0100)]
BUG-2673: Introduce AbstractDOMStoreTreeChangePublisher
This is a base class, reusable for various DOMStore implementations,
which want to implement the DOMStoreTreeChangePublisher interface.
Change-Id: I77f2488f3b99d9e9e34c97772df5a157c245f8c7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Robert Varga [Mon, 16 Mar 2015 09:41:44 +0000 (10:41 +0100)]
BUG-2673: Create AbstractRegistrationTree and related classes
This is a generalization of ListenerTree, useful for reusing the
infrastructure for multiple types of registrations.
Change-Id: I715b876d932d0a14ab9a479b1f1d39509a67e30b
Signed-off-by: Robert Varga <rovarga@cisco.com>
Maros Marsalek [Mon, 16 Mar 2015 12:22:03 +0000 (13:22 +0100)]
BUG-2713 Extract capability implementations into util
Identical implementations all over the place are now in 2 classes in
netconf-util
Change-Id: Ibc2aa78edb581654da1ac890d109d2f32cf94738
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Mon, 16 Mar 2015 13:20:02 +0000 (14:20 +0100)]
Reenable netconf-notifications-impl xml tests
The tests were disabled due to improper configuration for XMLUtil.
The configuration is fine now.
Change-Id: I59fe1081ac927596fc55079e62088cceb5b52811
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Robert Varga [Fri, 13 Mar 2015 12:11:50 +0000 (13:11 +0100)]
BUG-2839: remove dependencies on commons-io
Replaces uses of IOUtils methods with guava/JDK equivalents.
Change-Id: I16ece0feec2f4dc84c3be91ec675a0294cffcffb
Signed-off-by: Robert Varga <rovarga@cisco.com>
Tony Tkacik [Sat, 14 Mar 2015 10:12:31 +0000 (10:12 +0000)]
Merge changes I8ad04406,I3ea2166c
* changes:
BUG-2314 Fix (no-input)rpcs serialization in netconf connector
Fix Already initialized exception from netconf-connector
Maros Marsalek [Fri, 13 Mar 2015 14:12:55 +0000 (15:12 +0100)]
BUG-2314 Fix (no-input)rpcs serialization in netconf connector
Rpcs with no input were not wrapped in rpc element correctly
Change-Id: I8ad0440681e83dd3a04a8ba38f49b2d7c4976caa
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Fri, 13 Mar 2015 12:49:07 +0000 (13:49 +0100)]
Fix Already initialized exception from netconf-connector
Netconf-connector called initialization code and cleanup code (after capability
changed notification was received) in wrong order. This caused the cleanup
Change-Id: I3ea2166c912e2b6775bf9493a95102d66b5ae8a2
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Fri, 13 Mar 2015 12:28:31 +0000 (12:28 +0000)]
Merge "BUG-2596 Workaround for scheduled-threadpool module"
Moiz Raja [Fri, 13 Mar 2015 11:50:50 +0000 (11:50 +0000)]
Merge "Change in AbstractRaftBehavior#performSnapshotWithoutCapture"
Maros Marsalek [Fri, 13 Mar 2015 10:39:28 +0000 (11:39 +0100)]
BUG-2596 Workaround for scheduled-threadpool module
Register the scheduled-threadpool as all available service types in initial
config.
Change-Id: If7929fbb9996f0ea8902d50e2c71875d343f229f
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Moiz Raja [Fri, 13 Mar 2015 10:31:26 +0000 (10:31 +0000)]
Merge "Refactor ShardTest"
Moiz Raja [Fri, 13 Mar 2015 10:29:13 +0000 (10:29 +0000)]
Merge "Reduce/enhance logging in AbstractLeader"
Moiz Raja [Fri, 13 Mar 2015 10:28:37 +0000 (10:28 +0000)]
Merge "Purge in-memory log when install snapshot is done"
Moiz Raja [Fri, 13 Mar 2015 10:26:21 +0000 (10:26 +0000)]
Merge "Use static Procedure callback for ApplyJournalEntries"
Moiz Raja [Fri, 13 Mar 2015 10:26:02 +0000 (10:26 +0000)]
Merge "Changes in RaftActor#handleCaptureSnapshotReply"
Moiz Raja [Fri, 13 Mar 2015 10:25:41 +0000 (10:25 +0000)]
Merge "Change fields in ShardStats to non-volatile"
Tony Tkacik [Fri, 13 Mar 2015 09:23:39 +0000 (09:23 +0000)]
Merge "BUG-2314 Expose inventory mountpoint on proper path"
Tom Pantelis [Wed, 11 Mar 2015 23:56:51 +0000 (19:56 -0400)]
Add RaftActor integration tests
Added 2 integration tests classes,
ReplicationAndSnapshotsIntegrationTest and
ReplicationAndSnapshotsWithLaggingFollowerIntegrationTest, with tests
for various replication and snapshotting scenarios. These differ from the
RaftActorTest and behavior tests in that it uses real leaders and followers
with real RaftActors end-to-end.
Change-Id: Idfb4fbea20567cf8d86c36ed9def588261299bdb
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 11 Mar 2015 21:40:00 +0000 (17:40 -0400)]
Refactor InMemoryJournal and InMemorySnapshot to sal-akka-raft
Moved the InMemoryJournal and InMemorySnapshot test classes from
sal-distributed-datastore to sal-akka-raft as they provide more
complete implementations than the MockAkkaJournal and
MockSnapshotStore. The latter were removed. sal-distributed-datastore
already has a dependency on sal-akka-raft's test-jar.
Change-Id: Ief82b05005699aec38d069f7ce229c56002ab8b0
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Fri, 13 Mar 2015 03:49:03 +0000 (23:49 -0400)]
Bug 2845: Temporarily ignore RestPutOperationTest
RestPutOperationTest is frequently failing the verify builds so
setting to Ignore until the issue is fixed.
Change-Id: I134a6d73930cd104225a27880e87867026f35f03
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Ryan Goulding [Fri, 13 Mar 2015 15:15:32 +0000 (11:15 -0400)]
Bug 2834: Fix Restconf POST to wait for completion
This changeset introduces a blocking mechanism for Restconf POST to ensure that
the transaction completes before a response is returned, as is consistent with
Restconf PUT behavior. checkedGet() is utilized to ensure write transaction
completion.
Change-Id: I74f68b883f6037ec62644a468d3cbb9370d8d25f
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
Vaclav Demcak [Wed, 11 Mar 2015 13:13:22 +0000 (14:13 +0100)]
Fix bug 2821 - restconf RPC parsing returns http status 500
Note: RpcDefinition is a direct child of SchemaNode and we are not able to
use it as DataSchemaNode or SchemaContext. In next RpcDefinition hasn't any
child except Input & Output ContainerNodes. So we are using RpcDefinition
for SchemaNode as a marker in InstanceIdentfierContext.
* json input read @Provider has to change RpcDefinition SchemaNode
to Input ContainerSchemaNode for a correct parsing RPC input data from stream
* no-payload Rpc - Rpc Call could be without payload, but jersey always does
to parse empty stream to NormalizedNode so we add check for stream.available
before start parsing input NormalizedNode from stream and return NNContext
with null data. All checks for data exist have to be implemented for every
method with NormalizedNodeContext.
* fix RpcOutput NormalzidNodeContext in RestconfImpl - we expect to have
RpcDefinition as reultNodeSchema and data are payloaded inside as Output obj.
* fix NormalizedNodeJsonBodyWriter and NormalizedNodeXmlBodyWriter for RpcDefinition
- RpcDefinition has no child elements so RpcDefinition.output has to be a root
DataSchemaNode for json parser
* add JsonBodyReader/Writer test suite
* add Xml rpc Writer parser test suite
Change-Id: I31273bee937f57fa1551a33fcc4d6c81b984afb6
Signed-off-by: Vaclav Demcak <vdemcak@cisco.com>
Robert Varga [Thu, 12 Mar 2015 16:48:45 +0000 (17:48 +0100)]
Add missing union type builder
This type was missing and should not be generated over and over again.
Change-Id: Ife3e97c2c639e29ca2115429b53e6dec62440db7
Signed-off-by: Robert Varga <rovarga@cisco.com>
Maros Marsalek [Thu, 12 Mar 2015 15:38:53 +0000 (16:38 +0100)]
BUG-2314 Expose inventory mountpoint on proper path
The path is updated according to the Normalized nodes API
Change-Id: Ibeb8b98016d0056a703eb97f6e31c6a5507a21ea
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Tony Tkacik [Thu, 12 Mar 2015 11:58:32 +0000 (11:58 +0000)]
Merge "BUG-2343 Report sideloaded models for nc correctly"
Tony Tkacik [Thu, 12 Mar 2015 11:57:36 +0000 (11:57 +0000)]
Merge "BUG-2314 Allow rpcs with no input in netconf connector"
Tony Tkacik [Thu, 12 Mar 2015 11:04:09 +0000 (11:04 +0000)]
Merge "Quick fix nullable RPC input"
Maros Marsalek [Wed, 11 Mar 2015 15:30:47 +0000 (16:30 +0100)]
BUG-2314 Allow rpcs with no input in netconf connector
Change-Id: I81b05c98032c8bda7b34608c33ddcb5a0888ba67
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Maros Marsalek [Thu, 12 Mar 2015 09:57:00 +0000 (10:57 +0100)]
BUG-2343 Report sideloaded models for nc correctly
The sideloading of models behaved as a merge operation but was reported as
replace. Report the resulting models as a merge.
Change-Id: Id44d077e72ae0ce5f202c5178d5c7e5b825d6deb
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Jan Hajnar [Wed, 11 Mar 2015 10:56:37 +0000 (11:56 +0100)]
fixed restconf notification subscription parsing.
Change-Id: I7cf7f6fcbe4c45e5a462be6da61907712c4c7784
Signed-off-by: Jan Hajnar <jhajnar@cisco.com>
Tom Pantelis [Sun, 8 Mar 2015 12:16:07 +0000 (08:16 -0400)]
Change fields in ShardStats to non-volatile
Most if the fields in ShardStats are volatile or AtomicLong counters.
While volatile guarantees immediate thread visibility, we can live with
eventual consistency to avoid the overhead of volatile writes on the
fast path as reads via JMX will be infrequent.
All of the counters except 1 are updated by Shard so concurrent updates
won't occur. failedReadTransactionsCount is updated by ShardTransaction
so we need to keep that as AtomicLong as it will be updated concurrently.
But it's a failure counter so will be updated infrequently.
Change-Id: I6a0f748bd595379243e0ea31d84f6c8d0989003a
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Moiz Raja [Thu, 12 Mar 2015 01:33:51 +0000 (01:33 +0000)]
Merge "Add sal-akka-raft test-jar dependency to sal-distributed-store pom"
Tom Pantelis [Thu, 12 Mar 2015 00:12:42 +0000 (20:12 -0400)]
Use static Procedure callback for ApplyJournalEntries
Optimization in RaftActor to reuse a static Procedure callback instance
when persisting ApplyJournalEntries.
Change-Id: Id4b799b847191f9d7b31aca54d9926638407410e
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 11 Mar 2015 23:30:59 +0000 (19:30 -0400)]
Changes in RaftActor#handleCaptureSnapshotReply
captureSnapshot.getReplicatedToAllIndex() is usually -1 (in fact I
haven't yet been able to come with a test scenario where it isn't) and
we shouldn't reset the behavior's replicatedToAllIndex history when
we snapshot due to memory threshold exceeded. This prevents log trimming
when a lagging follower is caught up via install snapshot. Eventually
log trimming would catch up on subsequent replicates but I don't see a
reason why we should reset it to -1.
Also made a couple other logging changes.
Change-Id: I6b9eafc84455a88c3bc1fc91608fe257c03b4093
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Thu, 12 Mar 2015 00:00:06 +0000 (20:00 -0400)]
Change in AbstractRaftBehavior#performSnapshotWithoutCapture
If tempMin isn't present in the log and tempMin is grater
than the current replicatedToAllIndex, then update replicatedToAllIndex
to tempMin. Details are in the code comments.
Change-Id: I373d5c4b7ce9fd2504f2a4fa996b49a6d9ffe5b6
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 11 Mar 2015 22:31:25 +0000 (18:31 -0400)]
Reduce/enhance logging in AbstractLeader
If you turn on debug logging for Shard, the "Checking sendAppendEntries
for follower..." message is logged by sendUpdatesToFollower on every
AppendEntriesReply heartbeat even when no data was sent to the follower.
This bombards the karaf.log. To avoid this, we need this only logged if
something changed for the follower. So, I changed the FollwerLogInformation
setMatchIndex and setNextIndex methods to return a boolean if changed
which handleAppendEntriesReply checks to see if either were updated. If
neither changed, it passes true to sendUpdatesToFollower for isHeartbeat
so the message isn't logged.
I also made a few other minor logging changes.
Change-Id: Ib1f2109092b3656c3cc3dfdd2cd7b4641a3f890b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 11 Mar 2015 22:11:33 +0000 (18:11 -0400)]
Purge in-memory log when install snapshot is done
In AbstractLeader#handleInstallSnapshotReply, after the last snapshot
chunk has been sent and acknowledged by the follower and, since install
snapshot *should* only happen for a lagging follower, the follower
is most likely caught up at this point so we can be greedy and try
to trim the log and advance replicatedToAllIndex.
Change-Id: Id22dfbcb6e459e3d3f6801d1c6c850bdd42989fa
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tom Pantelis [Wed, 11 Mar 2015 21:11:22 +0000 (17:11 -0400)]
Add sal-akka-raft test-jar dependency to sal-distributed-store pom
So we can use the test utilities in sal-akka-raft.
Change-Id: Ibb28522ed49c61c53d3b3296b38c898c7ea5129b
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Tony Tkacik [Wed, 11 Mar 2015 19:28:01 +0000 (19:28 +0000)]
Merge "Fixed testool performance bottleneck due to testtool using NetconfMonitoring from ODL. Added a dummy NetconfMonitoring implementation for testtool."
Tony Tkacik [Wed, 11 Mar 2015 19:27:46 +0000 (19:27 +0000)]
Merge "Changed NetconfDeviceDatastoreAdapter and NetconfDeviceTopologyAdapter to use TransactionChains instead of Transactions to prevent race condition between init and update when a device is created."