From: Tom Pantelis Date: Mon, 18 Dec 2017 21:40:25 +0000 (-0500) Subject: Reduce log level in FeatureConfigPusher to eliminate noise X-Git-Tag: release/oxygen~39 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=cca9b9b6e0ace6556dc3003ef69bdd29328c43f7;hp=0c8b6461924eef198c1e2d410554b3a0a138b9b7 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 --- diff --git a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java index 6f304452a9..49077dcc6f 100644 --- a/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java +++ b/opendaylight/config/config-persister-feature-adapter/src/main/java/org/opendaylight/controller/configpusherfeature/internal/FeatureConfigPusher.java @@ -9,7 +9,6 @@ package org.opendaylight.controller.configpusherfeature.internal; import com.google.common.base.Optional; import com.google.common.collect.LinkedHashMultimap; - import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -17,7 +16,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; - import org.apache.karaf.features.Feature; import org.apache.karaf.features.FeaturesService; import org.opendaylight.controller.config.persist.api.ConfigPusher; @@ -140,7 +138,7 @@ public class FeatureConfigPusher { return true; } - LOG.info("Karaf Feature Service has not yet finished installing feature {}/{} (retry {})", feature + LOG.debug("Karaf Feature Service has not yet finished installing feature {}/{} (retry {})", feature .getName(), feature.getVersion(), retries); } catch (final Exception e) { LOG.warn("Karaf featuresService.listInstalledFeatures() has thrown an exception, retry {}", retries, e); @@ -148,8 +146,16 @@ public class FeatureConfigPusher { TimeUnit.MILLISECONDS.sleep(RETRY_PAUSE_MILLIS); } - LOG.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() which has not yet " - + "finished installing feature {} {}", MAX_RETRIES, feature.getName(), feature.getVersion()); + + // In karaf 4.1.3 we see this error logged for 2 system features, "jaas-boot" and "wrap", many times. It's + // unclear why listInstalledFeatures doesn't return them but it doesn't really matter since we're only + // interested in ODL features that have CSS files. Maybe the common denominator is that they don't have a + // version (ie it's 0.0.0) hence the following check to avoid logging the error. This check would not + // exclude any ODL feature since all ODL features are versioned (should be anyway). + if (!"0.0.0".equals(feature.getVersion())) { + LOG.error("Giving up (after {} retries) on Karaf featuresService.listInstalledFeatures() which has not yet " + + "finished installing feature {} {}", MAX_RETRIES, feature.getName(), feature.getVersion()); + } return false; } }