commit | 14651b560d97b8cfcb6df5c9b8f4a22e6df6562c | [log] [tgz] |
---|---|---|
author | Jonathan Hart <jono@onlab.us> | Tue Jun 07 17:59:53 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Thu Jun 16 16:13:47 2016 +0000 |
tree | 3b70e87537b0b8764609cecc2710bb1a2ce09f1a | |
parent | 2425fcfb441f5f40962d27927c7915f2aa7b81c2 [diff] [blame] |
Purge app bits off disk if install fails due to insufficient prerequisites. Otherwise the system gets put in a state where the app can't be installed, activated or uninstalled due to discrepency between ONOS store state and disk. Change-Id: Ifbedeb34adf900304c096bff9b2d849932586dde
diff --git a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java index d2707d6..027e1a0 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java +++ b/core/store/dist/src/main/java/org/onosproject/store/app/DistributedApplicationStore.java
@@ -289,6 +289,9 @@ if (hasPrerequisites(appDesc)) { return create(appDesc, true); } + // Purge bits off disk if we don't have prerequisites to allow app to be + // reinstalled later + purgeApplication(appDesc.name()); throw new ApplicationException("Missing dependencies for app " + appDesc.name()); }