aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
diff options
context:
space:
mode:
authorAshlee Young <ashlee@wildernessvoice.com>2015-12-01 05:49:27 -0800
committerAshlee Young <ashlee@wildernessvoice.com>2015-12-01 05:49:27 -0800
commite63291850fd0795c5700e25e67e5dee89ba54c5f (patch)
tree9707289536ad95bb739c9856761ad43275e07d8c /framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
parent671823e12bc13be9a8b87a5d7de33da1bb7a44e8 (diff)
onos commit hash c2999f30c69e50df905a9d175ef80b3f23a98514
Change-Id: I2bb8562c4942b6d6a6d60b663db2e17540477b81 Signed-off-by: Ashlee Young <ashlee@wildernessvoice.com>
Diffstat (limited to 'framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java')
-rw-r--r--framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java b/framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
index d09eb1f1..80a5ca77 100644
--- a/framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
+++ b/framework/src/onos/core/net/src/main/java/org/onosproject/app/impl/ApplicationManager.java
@@ -237,12 +237,22 @@ public class ApplicationManager
boolean changed = false;
for (String name : app.features()) {
Feature feature = featuresService.getFeature(name);
+
+ // If we see an attempt at activation of a non-existent feature
+ // attempt to install the app artifacts first and then retry.
+ // This can be triggered by a race condition between different ONOS
+ // instances "installing" the apps from disk at their own pace.
+ // Perhaps there is a more elegant solution to be explored in the
+ // future.
+ if (feature == null) {
+ installAppArtifacts(app);
+ feature = featuresService.getFeature(name);
+ }
+
if (feature != null && !featuresService.isInstalled(feature)) {
featuresService.installFeature(name);
changed = true;
- } else if (feature == null && !initializing) {
- // Suppress feature-not-found reporting during startup since these
- // can arise naturally from the staggered cluster install.
+ } else if (feature == null) {
log.warn("Feature {} not found", name);
}
}