commit | a273b8c8ed9df57c43aeb9ff556e6b3a35155d66 | [log] [tgz] |
---|---|---|
author | Jonathan Hart <jono@onlab.us> | Tue Jun 07 17:59:53 2016 -0700 |
committer | Jonathan Hart <jono@onlab.us> | Thu Jun 16 16:13:58 2016 +0000 |
tree | 7e1425918233fcd9fc2fa4cfd3ab67319aeb66f4 | |
parent | bec32ebdf3a8e9f7b72cd328ed15ea2ab12f5473 [diff] |
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 (cherry picked from commit 14651b560d97b8cfcb6df5c9b8f4a22e6df6562c)
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()); }