Fix PERM issue when restoring an app with redis

This is the root cause of 926224bd5d.

0488aada9f caused a regression where
we setup addons in the restore code path. This meant that redis was
instantiated and running, changing the perms of the dir. Then when
the backup extract happens it fails as it has wrong permissions.
This commit is contained in:
Girish Ramakrishnan
2017-04-20 17:55:47 -07:00
parent a5efdb067d
commit 2083efdef8
+11 -9
View File
@@ -379,16 +379,18 @@ function install(app, callback) {
updateApp.bind(null, app, { installationProgress: '50, Creating volume' }),
createVolume.bind(null, app),
updateApp.bind(null, app, { installationProgress: '60, Setting up addons' }),
addons.setupAddons.bind(null, app, app.manifest.addons),
function restoreFromBackup(next) {
if (!backupId) return next();
async.series([
updateApp.bind(null, app, { installationProgress: '65, Download backup and restore addons' }),
backups.restoreApp.bind(null, app, app.manifest.addons, backupId),
], next);
if (!backupId) {
async.series([
updateApp.bind(null, app, { installationProgress: '60, Setting up addons' }),
addons.setupAddons.bind(null, app, app.manifest.addons),
], next);
} else {
async.series([
updateApp.bind(null, app, { installationProgress: '60, Download backup and restoring addons' }),
backups.restoreApp.bind(null, app, app.manifest.addons, backupId),
], next);
}
},
updateApp.bind(null, app, { installationProgress: '70, Creating container' }),