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 14651b56)
Showing
1 changed file
with
3 additions
and
0 deletions
... | @@ -289,6 +289,9 @@ public class DistributedApplicationStore extends ApplicationArchive | ... | @@ -289,6 +289,9 @@ public class DistributedApplicationStore extends ApplicationArchive |
289 | if (hasPrerequisites(appDesc)) { | 289 | if (hasPrerequisites(appDesc)) { |
290 | return create(appDesc, true); | 290 | return create(appDesc, true); |
291 | } | 291 | } |
292 | + // Purge bits off disk if we don't have prerequisites to allow app to be | ||
293 | + // reinstalled later | ||
294 | + purgeApplication(appDesc.name()); | ||
292 | throw new ApplicationException("Missing dependencies for app " + appDesc.name()); | 295 | throw new ApplicationException("Missing dependencies for app " + appDesc.name()); |
293 | } | 296 | } |
294 | 297 | ... | ... |
-
Please register or login to post a comment