Remove infra upgrade logic

We now upgrade using the dumps of the last backups which are in the
filesystem itself instead of downloading the entire app from the
backup all over.
This commit is contained in:
Girish Ramakrishnan
2018-10-16 11:04:34 -07:00
parent 539447409e
commit 03d513a3b1
2 changed files with 7 additions and 14 deletions

View File

@@ -360,21 +360,16 @@ function startAddons(existingInfra, callback) {
}
function startApps(existingInfra, callback) {
// Infra version change strategy:
// * no existing version - restore apps
// * major versions - restore apps
// * minor versions - reconfigure apps
if (existingInfra.version === infra.version) {
debug('startApp: apps are already uptodate');
callback();
} else if (existingInfra.version === 'none' || !semver.valid(existingInfra.version) || semver.major(existingInfra.version) !== semver.major(infra.version)) {
if (existingInfra.version === 'none') {
debug('startApps: restoring installed apps');
apps.restoreInstalledApps(callback);
} else {
} else if (existingInfra.version !== infra.version) {
debug('startApps: reconfiguring installed apps');
reverseProxy.removeAppConfigs(); // should we change the cert location, nginx will not start
apps.configureInstalledApps(callback);
} else {
debug('startApps: apps are already uptodate');
callback();
}
}