redis: do not import if not upgrading

There will be no backup to import from
This commit is contained in:
Girish Ramakrishnan
2018-10-17 10:48:19 -07:00
parent 78936a35c5
commit f4ad912cf3

View File

@@ -343,7 +343,7 @@ function startAddons(existingInfra, callback) {
// always start addons on any infra change, regardless of minor or major update
if (existingInfra.version !== infra.version) {
debug('startAddons: no existing infra or infra upgrade. starting all addons');
debug(`startAddons: ${existingInfra.version} -> ${infra.version}. starting all addons`);
startFuncs.push(
startMysql.bind(null, existingInfra),
startPostgresql.bind(null, existingInfra),
@@ -1217,6 +1217,11 @@ function startRedis(existingInfra, callback) {
assert.strictEqual(typeof existingInfra, 'object');
assert.strictEqual(typeof callback, 'function');
const tag = infra.images.redis.tag;
const upgrading = existingInfra.version !== 'none' && requiresUpgrade(existingInfra.images.redis.tag, tag);
if (!upgrading) return callback();
importDatabase('redis', callback); // setupRedis currently starts the app container
}