Remove CSS code JIRA: TSC-111 Change-Id: Ib74c1d3dfc029c2472b8834ae55ce05c8231d225 Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
CSS: handle features with no version When a feature has no version, it can end up interpreted as having version 0.0.0 (which is the default version). CSS ends up looking for features with version 0.0.0, which fail to compare with versionless features. This patch deals with this case explicitly. Change-Id: I354c7d679e194c38a6aa6883deb2da2b24cda29e Signed-off-by: Stephen Kitt <skitt@redhat.com>
Do not inline karaf.features.internal.model Since karaf-4.1.2+ exposes proper model-level indicator of version non-presence, we do not need to muck around in internals -- leading to us not inlining ~90KiB of classes. Also trims duplicate dependencies, as features-core already contains a copy of felix.utils -- eliminating a bundle warning. Change-Id: Ic6e3645a56a2e4a3072c50da52a34effe4a0b71a Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Reduce log level in FeatureConfigPusher to eliminate noise With the upgrade to karaf 4.1.3, we're seeing a lot of these log messages: 2017-12-18T15:56:14,593 | INFO | ConfigFeatureListener - ConfigPusher | FeatureConfigPusher | 72 - config-persister-feature-adapter - 0.8.0.SNAPSHOT | Karaf Feature Service has not yet finished installing feature wrap/0.0.0 (retry 78) 03:16:08.712 [ConfigFeatureListener - ConfigPusher] ERROR org.opendaylight.controller.configpusherfeature.internal.FeatureConfigPusher - Giving up (after 100 retries) on Karaf featuresService.listInstalledFeatures() which has not yet finished installing feature *wrap* 0.0.0 They only occur for system features "jaas-boot" and "wrap". Reduce them to debug. Change-Id: I8c421f34f9c49d4e5a70649ad9af55e8cffe197d Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
Fix checkstyle issues to enforce it Change-Id: I901673c4c8f478e914efd54d26bee56a80296868 Signed-off-by: David Suarez <david.suarez.fuentes@gmail.com>
Bump to odlparent 2.0.0 This takes odlparent 2.0.0, adjusts for guava update and feature movement. Since jenkins is failing on the distro run, that is disabled and a follow-up patch will re-enable it to get us going again. Change-Id: If3e1289ed7f73a79a5a47428c634bda9702e824d Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
config-persister-feature-adapter: use lambdas This series of patches uses lambdas instead of anonymous classes for functional interfaces when possible. Lambdas are replaced with method references when appropriate. Change-Id: Ie1c0dda47a741196de89c95cec49fff572904153 Signed-off-by: Stephen Kitt <skitt@redhat.com>
config-persister-feature-adapter: final parameters This automatically-generated patch flags all appropriate parameters as final (including caught exceptions). Change-Id: Ic198d806782423545323cc00075219fa89d06dd4 Signed-off-by: Stephen Kitt <skitt@redhat.com>
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>
Removed sonar warnings. Change-Id: I53136e343bd54e9f0a687044037bc61deebb05b4 Signed-off-by: Dana Kutenicsova <dana.kutenics@gmail.com>
Mechanical code cleanup (config) * Remove unnecessary type specifiers (use Java 7 <>) * Remove unnecessary "extends Object" declarations * Remove unnecessary semi-colons * Merge identical catch blocks * Remove redundant modifiers: - enum constructors are private by default - interface properties are public static final by default - interface methods are public abstract by default - interfaces are abstract by default - inner interfaces are static by default - inner classes in interfaces are public static by default Change-Id: Iefd8363a5eb120fdd43a4632b9e3db0e7e347dba Signed-off-by: Stephen Kitt <skitt@redhat.com>
Bug 6535: Fix feature config pusher warning The feature config pusher assumes config files installed by features that have XML extension are CSS files and tries to parse them. On failure it prints a warning but ignores it and moves on. Up till now we've only had CSS XML files but we now have XML files related to the clustered-app-config. To avoid the warning I added a check to see if the root element is "snapshot" if JAXB parsing fails. Change-Id: I877921afc13564f131f61a1eb8327db71d3638fe Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Revert "Fix feature config pusher warning" This reverts commit 64e760caf2a5d223cca7598b3ff8941ac37c7a96. Unfortunately some projects don't follow the convention of installing their CSS xml files under etc/opendaylight/karaf. Change-Id: I6194035399eddc1d66cadaa7f9b0964b9a46d92b Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix feature config pusher warning The feature config pusher assumes config files installed by features that have XML extension are CSS files and tries to parse them. On failure it prints a warning but ignores it and moves on. Up till now we've only had CSS XML files but we now have XML files related to the clustered-app-config. To avoid the warning I added an additional check for "opendaylight/karaf" present in the file path. To be complete we would open the file and inspect the first element but I didn't think that was worth the effort since all current CSS files are put under opendaylight/karaf and ODL is moving away from CSS. Change-Id: I1f0dcda9efa14db330a72e455fe4756c8fbfcaab Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Reduce missing feature warning to debug Many warn messages are emmitted for the "startup" feature: Feature: startup, 0.0.0 is missing from features service. Skipping It seems this is an internal karaf feature and can't be retrieved. This warning has been seen for other system features in the past. Since the FeatureConfigPusher is only interested in ODL bundles for the purpose of pushing CSS modules and since this warning has always been benign, I reduced the log to debug to avoid the many warnings on startup. Change-Id: Iad00acccfd0eabd55acb02493e689879e29646f0 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Fix NPE in AbstractFeatureWrapper Added check in ChildAwareFeatureWrapper#getChildFeatures to verify the feature exists in the FeaturesService to avoid NPE. This is a similar workaround as was done in FeatureConfigPusher for a bug in karaf where the FeaturesService may mysteriously return null for an existing feature. Change-Id: I006cd012e919ac206d70bb4ee5754c72f0f01b32 Signed-off-by: Tom Pantelis <tpanteli@brocade.com> (cherry picked from commit e6076f69f57fe5918c66637414175c6229635841)
BUG-2976: Resolve clash between current and feature cfg pusher Current config pusher now stores list of features present in karaf with the config snapshot itself. Feature pusher now looks at the list and ignores features listed in current config in the initial push. A WARN log message is emitted for each ignored config file + feature. Change-Id: I6e71e692e56d5219cf02cd704dd78215f4a7f5a2 Signed-off-by: Maros Marsalek <mmarsale@cisco.com> (cherry picked from commit fa8b972c6da7e3a24af396ea4bebe6d06f6a8d89)
Bug 2150: Feature wrappers now log parse errors better. getFeatureConfigSnapshotHolders() logging is now similar to what XmlDirectoryPersister.fromXmlSnapshot() does. Also, files not ending with .xml (and not available files) are filtered out as they do not hold configuration snapshots. Warn level for config load failure. Change-Id: I7c9d472bbe0ad031aaf7cc8dead1fd1e41d93306 Signed-off-by: Vratko Polak <vrpolak@cisco.com> Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Bug 2907: Make sure we are properly bumped to Karaf 3.0.3 Change-Id: Ic9303c71fcfc39849401a7cdaa24b44f3836067b Signed-off-by: Tony Tkacik <ttkacik@cisco.com>