Jonathan Hart
Committed by Gerrit Code Review

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
......@@ -289,6 +289,9 @@ public class DistributedApplicationStore extends ApplicationArchive
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());
}
......