repair: take optional docker image for re-configure
This commit is contained in:
@@ -1393,6 +1393,7 @@ function getLogs(appId, options, callback) {
|
||||
}
|
||||
|
||||
// does a re-configure when called from most states. for install/clone errors, it re-installs with an optional manifest
|
||||
// re-configure can take a dockerImage but not a manifest because re-configure does not clean up addons
|
||||
function repair(appId, data, auditSource, callback) {
|
||||
assert.strictEqual(typeof appId, 'string');
|
||||
assert.strictEqual(typeof data, 'object'); // { manifest }
|
||||
@@ -1427,6 +1428,10 @@ function repair(appId, data, auditSource, callback) {
|
||||
}
|
||||
} else {
|
||||
errorState = exports.ISTATE_PENDING_CONFIGURE;
|
||||
if (data.dockerImage) {
|
||||
let newManifest = _.extend({}, app.manifest, { dockerImage: data.dockerImage });
|
||||
task.values.manifest = newManifest;
|
||||
}
|
||||
}
|
||||
|
||||
addTask(appId, errorState, task, function (error, result) {
|
||||
|
||||
Reference in New Issue
Block a user