Remove CSS modules The CSS features are still installed until we can work out the ModuleInfoBackedContext/ClassLoaderStrategy situation that is currently provided by the ConfigManagerActivator. Change-Id: Id3b2cc287d17532482a2dd893c41e2dcd8d29ff0 Signed-off-by: Tom Pantelis <tompantelis@gmail.com> Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Eliminate DatastoreContext CSS dependency The CSS-generated Config/OperatonalProperties classes were used to obtain the default values from the yang. That is now done by creating an empty container NormalizedNode and running it thru BindingNormalizedNodeSerializer#fromNormalizedNode to fill in the default values which are then injected into the DatastoreContext builder via reflection. Change-Id: I0963dfcf7850b705d048030056f4b233cc7e4566 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Convert CDS implementation to use msdal APIs The LegacyDOMDataBrokerAdapter is the proxy for the controller API. Change-Id: I697e2979bef4dcffe544717af1380aa7d7b89d50 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix checkstyle reported by odlparent-3.0.0 Change-Id: I08c548fbbbef8527ad7b037b0def33d3c1c09bf6 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Fix karaf restart instruction We accidentally dropped a 0 in getBundle() -- we need to stop the system bundle, not the CDS bundle. Change-Id: Idbaa59aa39c2863ec76859b2ffa448b50890fd55 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Bug 8967 - Various classes in cntrl/md-sal use hardcoded dependencies on OSGI/karaf - PART 1 * remove dependency of ActorSystemProviderImpl on OSGI * move Config out of ActorSystemProviderImpl Change-Id: I7e9cb184385207726839e137ea6dcafd6359c47b Signed-off-by: Jakub Toth <jakub.toth@pantheon.tech>
BUG-8143: issue a JVM restart Instead of just restarting the OSGi framework, instruct karaf to re-execute the JVM. Change-Id: I10709f61b71d578e4677a5948c23e38f9871c6a1 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Make AbstractClientConnection timeouts configurable So we can tweak them in production and unit tests. Change-Id: I39ce8cdf3cd5397a71f52c42357943dfe5eccb7c Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Bug 7449: Add maximum-message-slice-size config param Added a new maximum-message-slice-size config param that will be used when fragmenting messages thru the akka remoting framework. This is a generalized version of the shard-snapshot-chunk-size param and replaces it. Change-Id: I4dc4cc0de92d6f876e5587cd8cb3ade2abb59285 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
BUG-8618: make sync threshold tuneable We are observing quite a few of these transitions, which may be coming from batching scenarios. Introduce sync-index-threshold config knob to expose control over it. Change-Id: Ief4c89c2fe5b95cebaf3fb83cbcdda37cac126b6 Signed-off-by: Robert Varga <robert.varga@pantheon.tech> (cherry picked from commit 890e4bbf40aee318a2174bd4130cf34437e5617b)
Bug 7521: Add FileBackedOutputStream and use for snapshot chunking Added a FileBackedOutputStream class, similar to the one in guava except: - allows for the temp dir to be confgured - keeps track of the count of bytes written for efficiency - uses a PhantomReference to delete the temp file instead of using finalize. FileBackedOutputStream is now used in chunking the snapshop on the leader side and re-assembling on the follower side. Change-Id: Ieea4bc1388ffe18d6803783d2bb714089716b7b1 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
BUG-5280: split DistributedDataStore Split the DistributedDataStore into two components into an abstract base class and concretization running with TransactionProxies. Add another concretization, which uses DataStoreClient to instantiate requests. Change-Id: I454eec76d54c2fd4e4ea1e5cd16d12398eec81f0 Signed-off-by: Robert Varga <rovarga@cisco.com>
Fix FindBugs warnings in sal-distributed-datastore and enable enforcement Several warnings were suppressed via annotation with justification provided. Other warnings that were fixed: - remove redundant implements in several classes - "The referenced methods have names that differ only by capitalization" warnings. This is checked across all classes for consistency. The main offender was getTransactionID vs. getTransactionId. I changed all methods to getTransactionId and associated fields to transactionId. - unsynchronized access to a field where access is synchronized elsewhere (in DataTreeChangeListenerProxy and DatastoreContextIntrospector). - catching Exception instead of catching more specific exception types that are thrown from the try block. - unconfirmed casts - verify via Preconditions check to avoid warning - unnecessarily calling toString() on a String instance - synchronizing an AtomicInteger instance (in ThreePhaseCommitCohortProxy) - not an issue in this case but changed to synchronize a separate Object in lieu of supressing the warning. - unsynchronized to SimpleDateFormat which isn't thread-safe (in ShardStats). - potential null-pointer access of 'shard' in ShardStats - changed to pass 'shard' to the ctor in lieu of setter. - calling String#getBytes w/o specifying encoding (in DataTreeModificationOutput). - privileged access to create ClassLoader in ActorSystemProviderImpl although not likely a SecurityManager would ever be present. Change-Id: I0a87208f3f200fbe4f78e950c21419fbab154d94 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix warnings/javadocs in sal-distributed-datastore First off, I apologize for the size of this patch. There's a ton of classes in this project and I didn't even get to all of them (will follow-up). While a lot of files were touched, the changes were mostly small. Fixed a lot of checkstyle warnings and cleaned up javadocs. Most of the warnings/changes were for: - white space before if/for/while/catch - white space before beginning brace - line too long - illegal catching of Exception (suppressed) - variable name too short - indentation - missing period after first sentence in javadoc - missing first sentence in javadoc - missing <p/> in javadoc Change-Id: Id56d874a8fbcbbc9285279a71c0a5aba393653a9 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Use ActorSystem.terminate() ActorSystem.shutdown() has been deprecated, move on to the replacement call. Change-Id: I21cee3100c84003585afd9c95706c26f686d0eec Signed-off-by: Robert Varga <rovarga@cisco.com>
Convert distributed EOS impl to use new DOM EOS interfaces Change-Id: I5b2a6098a0c15f74ec2f16cb5451f3831ed913bf Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Move ClusterAdminRpcService to its own bundle The ClusterAdminRpcService can't be instantiated with the clustered datastore blueprint xml b/c it needs the binding RPC registry service so I moved it to its own bundle. I made the ClusterAdminProviderModule a no-op since the ClusterAdminRpcService is now created via blueprint. I also had to export some packages from the sal-distributed-datastore bundle. Change-Id: Icaf025517ed9b08a82a81310f1e5dd2ac0647559 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Address comments in prior patches Follow-up patch to address comments in https://git.opendaylight.org/gerrit/#/c/36476/ and https://git.opendaylight.org/gerrit/#/c/36485/. Change-Id: Ic4e9c4957a3440c8772fe814a3f4732c054b3271 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Modify config Module impls to co-exist with blueprint Modified various config system Module implementation classes which have corresponding instances created and advertised via blueprint to obtain the instance in createInstance from the OSGi registry. The instance may not be available yet so it will wait. I added a WaitingServiceTracker class to encapsulate this logic using a ServiceTracker. For those modules that don't advertise services, createInstance simply returns a noop AutoCloseable since the components are created via blueprint. I also added the new disable-osgi-service-registration flag to the corresponding service yang identities to prevent the CSS from duplicating the service registrations. This patch also adds the blueprint bundle to the mdsal features and "turns on" blueprint. Change-Id: I60099c82a2a248fc233ad930c4808d6ab19ea881 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
CDS: Make AbstractDataBroker non-public Move ConcurrentDataBroker, which is the only subclass into the same package and make AbstractDataBroker package-protected. Change-Id: I28fe350bb53a8bfca572c958ba81ca1a74059e14 Signed-off-by: Robert Varga <rovarga@cisco.com>