diff --git a/src/apps.js b/src/apps.js index 0bb77e048..35439f113 100644 --- a/src/apps.js +++ b/src/apps.js @@ -1885,9 +1885,8 @@ function configureInstalledApps(callback) { async.eachSeries(apps, function (app, iteratorDone) { debug(`configureInstalledApps: marking ${app.fqdn} for reconfigure`); - const oldConfig = _.pick(app, 'location', 'domain', 'fqdn', 'alternateDomains', 'portBindings'); const task = { - args: { oldConfig, overwriteDns: true }, + args: {}, values: {}, scheduleNow: false, // task will be scheduled by autoRestartTasks when platform is ready requireNullTaskId: false // ignore existing stale taskId diff --git a/src/apptask.js b/src/apptask.js index c57259d16..23ef2f2f3 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -772,42 +772,22 @@ function migrateDataDir(app, args, progressCallback, callback) { }); } -// configure is called for an infra update and repair +// configure is called for an infra update and repair to re-create container, reverseproxy config. it's all "local" function configure(app, args, progressCallback, callback) { assert.strictEqual(typeof app, 'object'); assert.strictEqual(typeof args, 'object'); assert.strictEqual(typeof progressCallback, 'function'); assert.strictEqual(typeof callback, 'function'); - const oldConfig = args.oldConfig || null; - const overwriteDns = args.overwriteDns; - async.series([ progressCallback.bind(null, { percent: 10, message: 'Cleaning up old install' }), unconfigureReverseProxy.bind(null, app), deleteContainers.bind(null, app, { managedOnly: true }), - function (next) { - if (!oldConfig) return next(); - - let obsoleteDomains = oldConfig.alternateDomains.filter(function (o) { - return !app.alternateDomains.some(function (n) { return n.subdomain === o.subdomain && n.domain === o.domain; }); - }); - - if (oldConfig.fqdn !== app.fqdn) obsoleteDomains.push({ subdomain: oldConfig.location, domain: oldConfig.domain }); - - if (obsoleteDomains.length === 0) return next(); - - unregisterSubdomains(app, obsoleteDomains, next); - }, - reserveHttpPort.bind(null, app), progressCallback.bind(null, { percent: 20, message: 'Downloading icon' }), downloadIcon.bind(null, app), - progressCallback.bind(null, { percent: 30, message: 'Registering subdomains' }), - registerSubdomains.bind(null, app, overwriteDns), - progressCallback.bind(null, { percent: 40, message: 'Downloading image' }), downloadImage.bind(null, app.manifest),